com.facebook.react.bridge.ReadableNativeArray Java Examples
The following examples show how to use
com.facebook.react.bridge.ReadableNativeArray.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApiMagnetReact.java From magnet-client with Mozilla Public License 2.0 | 5 votes |
static private Object fromReactArgument(Object object) { if (object instanceof ReadableNativeArray) return ((ReadableNativeArray) object).toArrayList(); else if (object instanceof ReadableNativeMap) return ((ReadableNativeMap) object).toHashMap(); else return null; }
Example #2
Source File: RNPublisherBannerViewManager.java From react-native-admob with BSD 2-Clause "Simplified" License | 5 votes |
@ReactProp(name = PROP_VALID_AD_SIZES) public void setPropValidAdSizes(final ReactPublisherAdView view, final ReadableArray adSizeStrings) { ReadableNativeArray nativeArray = (ReadableNativeArray)adSizeStrings; ArrayList<Object> list = nativeArray.toArrayList(); String[] adSizeStringsArray = list.toArray(new String[list.size()]); AdSize[] adSizes = new AdSize[list.size()]; for (int i = 0; i < adSizeStringsArray.length; i++) { String adSizeString = adSizeStringsArray[i]; adSizes[i] = getAdSizeFromString(adSizeString); } view.setValidAdSizes(adSizes); }
Example #3
Source File: RNPublisherBannerViewManager.java From react-native-admob with BSD 2-Clause "Simplified" License | 4 votes |
@ReactProp(name = PROP_TEST_DEVICES) public void setPropTestDevices(final ReactPublisherAdView view, final ReadableArray testDevices) { ReadableNativeArray nativeArray = (ReadableNativeArray)testDevices; ArrayList<Object> list = nativeArray.toArrayList(); view.setTestDevices(list.toArray(new String[list.size()])); }
Example #4
Source File: RNAdMobBannerViewManager.java From react-native-admob with BSD 2-Clause "Simplified" License | 4 votes |
@ReactProp(name = PROP_TEST_DEVICES) public void setPropTestDevices(final ReactAdView view, final ReadableArray testDevices) { ReadableNativeArray nativeArray = (ReadableNativeArray)testDevices; ArrayList<Object> list = nativeArray.toArrayList(); view.setTestDevices(list.toArray(new String[list.size()])); }
Example #5
Source File: RNAdMobRewardedVideoAdModule.java From react-native-admob with BSD 2-Clause "Simplified" License | 4 votes |
@ReactMethod public void setTestDevices(ReadableArray testDevices) { ReadableNativeArray nativeArray = (ReadableNativeArray)testDevices; ArrayList<Object> list = nativeArray.toArrayList(); this.testDevices = list.toArray(new String[list.size()]); }
Example #6
Source File: RNAdMobInterstitialAdModule.java From react-native-admob with BSD 2-Clause "Simplified" License | 4 votes |
@ReactMethod public void setTestDevices(ReadableArray testDevices) { ReadableNativeArray nativeArray = (ReadableNativeArray)testDevices; ArrayList<Object> list = nativeArray.toArrayList(); this.testDevices = list.toArray(new String[list.size()]); }