當前位置: 首頁>>代碼示例>>Java>>正文


Java ReactPackage類代碼示例

本文整理匯總了Java中com.facebook.react.ReactPackage的典型用法代碼示例。如果您正苦於以下問題:Java ReactPackage類的具體用法?Java ReactPackage怎麽用?Java ReactPackage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ReactPackage類屬於com.facebook.react包,在下文中一共展示了ReactPackage類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createReactInstanceManager

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected ReactInstanceManager createReactInstanceManager() {
    ReactInstanceManagerBuilder builder = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setJSMainModuleName(getJSMainModuleName())
            .setUseDeveloperSupport(getUseDeveloperSupport())
            .setRedBoxHandler(getRedBoxHandler())
            .setUIImplementationProvider(getUIImplementationProvider())
            .setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
            .setNativeModuleCallExceptionHandler(
                    new ReadingNativeModuleCallExceptionHandler());

    for (ReactPackage reactPackage : getPackages()) {
        builder.addPackage(reactPackage);
    }

    String jsBundleFile = getJSBundleFile();
    if (jsBundleFile != null) {
        builder.setJSBundleFile(jsBundleFile);
    } else {
        builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName()));
    }
    return builder.build();
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:25,代碼來源:MainApplication.java

示例2: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
	List<ReactPackage> result = new ArrayList<>();

	List<ReactPackage> additionalReactPackages = NavigationApplication.instance.createAdditionalReactPackages();
	if (additionalReactPackages != null)
		result.addAll(additionalReactPackages);

	if (!containsInstanceOfClass(result, MainReactPackage.class)) {
		result.add(new MainReactPackage());
	}
	if (!containsInstanceOfClass(result, NavigationReactPackage.class)) {
		result.add(new NavigationReactPackage());
	}

	return result;
}
 
開發者ID:wix,項目名稱:react-native-navigation,代碼行數:18,代碼來源:NavigationReactGateway.java

示例3: getReactInstanceManager

import com.facebook.react.ReactPackage; //導入依賴的package包/類
public static synchronized ReactInstanceManager getReactInstanceManager(
        Application application) {
    if (sSingletonManager == null) {
        ReactInstanceManager.Builder builder = ReactInstanceManager.builder()
                .setApplication(application)
                .setJSMainModuleName("index.android")
                .setUseDeveloperSupport(BuildConfig.DEBUG)
                        // TODO figure out the right thing to put here.
                .setInitialLifecycleState(LifecycleState.BEFORE_RESUME);

        for (ReactPackage reactPackage : getPackages()) {
            builder.addPackage(reactPackage);
        }

        builder.setBundleAssetName("index.android.bundle");
        sSingletonManager = builder.build();
    }
    return sSingletonManager;
}
 
開發者ID:alangpierce,項目名稱:react-native-android-audio-demo,代碼行數:20,代碼來源:ReactInstanceSingleton.java

示例4: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new NearbyPackage()
  );
}
 
開發者ID:miguelespinoza,項目名稱:react-native-nearby,代碼行數:8,代碼來源:MainApplication.java

示例5: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new CameraPackage()
  );
}
 
開發者ID:cuonghuynhvan,項目名稱:react-native-camera-android-simple,代碼行數:8,代碼來源:MainApplication.java

示例6: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            new ReactTwitterKitPackage(CONSUMER_KEY, CONSUMER_SECRET)
    );
}
 
開發者ID:netceteragroup,項目名稱:react-native-twitterkit,代碼行數:8,代碼來源:MainApplication.java

示例7: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new VectorIconsPackage(),
      new RNCollapsingToolbarPackage(),
      new RNNestedScrollViewPackage()
  );
}
 
開發者ID:cesardeazevedo,項目名稱:react-native-collapsing-toolbar,代碼行數:10,代碼來源:MainApplication.java

示例8: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new SystemSettingPackage()
  );
}
 
開發者ID:c19354837,項目名稱:react-native-system-setting,代碼行數:8,代碼來源:MainApplication.java

示例9: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new RNMessageComposePackage()
  );
}
 
開發者ID:joonhocho,項目名稱:react-native-message-compose,代碼行數:8,代碼來源:MainApplication.java

示例10: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
          new RNReactNativeAndoridShadowPackage()
  );
}
 
開發者ID:wix,項目名稱:react-native-andorid-shadow,代碼行數:8,代碼來源:MainApplication.java

示例11: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new RNGLModelViewPackage()
  );
}
 
開發者ID:rastapasta,項目名稱:react-native-gl-model-view,代碼行數:8,代碼來源:MainApplication.java

示例12: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new RNGLModelViewPackage()
  );
}
 
開發者ID:rastapasta,項目名稱:react-native-gl-model-view,代碼行數:8,代碼來源:MainApplication.java

示例13: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new ReactNativeAndroidAudioConverterPackage() // <---- add this line
  );
}
 
開發者ID:SovTech,項目名稱:ReactNativeAndroidAudioConverter,代碼行數:8,代碼來源:MainApplication.java

示例14: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
new RNRecyclerviewListPackage()
  );
}
 
開發者ID:godness84,項目名稱:react-native-recyclerview-list,代碼行數:8,代碼來源:MainApplication.java

示例15: getPackages

import com.facebook.react.ReactPackage; //導入依賴的package包/類
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new TestPackage()
  );
}
 
開發者ID:zupzup,項目名稱:react-native-ethereum,代碼行數:8,代碼來源:MainApplication.java


注:本文中的com.facebook.react.ReactPackage類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。