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


Java MainReactPackage類代碼示例

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


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

示例1: initializePage

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
private void initializePage() {
    mReactRootView = new ReactRootView(this);
    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new ImageIntentPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();
    mReactRootView.startReactApplication(mReactInstanceManager, "Clarifai", null);

    setContentView(com.sonnylab.imageintent.R.layout.activity_main);
    ((RelativeLayout) findViewById(com.sonnylab.imageintent.R.id.view_container)).addView(mReactRootView);
}
 
開發者ID:sonnylazuardi,項目名稱:react-native-image-intent,代碼行數:17,代碼來源:MainActivity.java

示例2: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "Basic", null);

    setContentView(mReactRootView);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:19,代碼來源:MainActivity.java

示例3: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new VectorIconsPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "Basic", null);

    setContentView(mReactRootView);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:20,代碼來源:patchedMainActivity.java

示例4: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            /* react-native icons */
            .addPackage(new ReactNativeIcons())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "allyoop", null);

    setContentView(mReactRootView);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:21,代碼來源:MainActivity.java

示例5: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "nearby", null);

    setContentView(mReactRootView);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:19,代碼來源:MainActivity.java

示例6: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "address_book", null);

    setContentView(mReactRootView);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:19,代碼來源:MainActivity.java

示例7: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);
    ReactInstanceManager.Builder mB =  ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED);


    mReactInstanceManager = mB.build();

    mReactRootView.startReactApplication(mReactInstanceManager, "RNNote", null);

    setContentView(mReactRootView);
}
 
開發者ID:yipengmu,項目名稱:RNNote,代碼行數:20,代碼來源:MainActivity.java

示例8: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mReactRootView = new ReactRootView(this);
    mReactInstanceManager = ReactInstanceManager.builder()
        .setApplication(getApplication())
        .setBundleAssetName("index.android.bundle")
        .setJSMainModuleName("index.android")
        .addPackage(new MainReactPackage())
        .setUseDeveloperSupport(BuildConfig.DEBUG)
        .setInitialLifecycleState(LifecycleState.RESUMED)
        .addPackage(new NativeActivityPackage())
        //.setUseOldBridge(true) // uncomment this line if your app crashes
        .build();
    mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", null);

    setContentView(mReactRootView);
}
 
開發者ID:haiyangjiajian,項目名稱:TestRNIntegrationNative,代碼行數:20,代碼來源:ReactActivity.java

示例9: getPackages

import com.facebook.react.shell.MainReactPackage; //導入依賴的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

示例10: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new ExtraDimensionsPackage(this))
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "Example", null);

    setContentView(mReactRootView);
}
 
開發者ID:Sunhat,項目名稱:react-native-extra-dimensions-android,代碼行數:20,代碼來源:MainActivity.java

示例11: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new ToastPackage())
            .addPackage(new ReactAdMobPackage())
            .addPackage(new MainReactPackage())                
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "admob", null);

    setContentView(mReactRootView);
}
 
開發者ID:rodripf,項目名稱:react-native-android-admob,代碼行數:21,代碼來源:MainActivity.java

示例12: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new ReactConfigPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "Example", null);

    setContentView(mReactRootView);
}
 
開發者ID:luggit,項目名稱:react-native-android-config,代碼行數:20,代碼來源:MainActivity.java

示例13: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new RNWebIntentPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "WebIntentExample", null);

    setContentView(mReactRootView);
}
 
開發者ID:ivanph,項目名稱:react-native-webintent,代碼行數:20,代碼來源:MainActivity.java

示例14: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mActivityResultManager = new ActivityResultManager();

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new YeeuuReactPackage(this))
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "Hello", null);

    setContentView(mReactRootView);
}
 
開發者ID:mickeyinfoshan,項目名稱:Android-Native-Modules,代碼行數:22,代碼來源:MainActivity.java

示例15: onCreate

import com.facebook.react.shell.MainReactPackage; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);

    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new AudioAndroidPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();

    mReactRootView.startReactApplication(mReactInstanceManager, "MyFirstReactNative", null);

    setContentView(mReactRootView);
}
 
開發者ID:bosung90,項目名稱:react-native-audio-android,代碼行數:20,代碼來源:MainActivity.java


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