com.facebook.react.ReactActivityDelegate Java Examples

The following examples show how to use com.facebook.react.ReactActivityDelegate. 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: BaseReactActivity.java    From MetroExample with Apache License 2.0 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    String localBundleName = getBundleName();
    if (!TextUtils.isEmpty(localBundleName)) {
        JsLoaderUtil.jsState.bundleName = localBundleName;
    }
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            JsLoaderUtil.load(getApplication(),
                    () -> super.onCreate(savedInstanceState));
        }
    };
}
 
Example #2
Source File: MainActivity.java    From dingo with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected ReactRootView createRootView() {
            return new RNGestureHandlerEnabledRootView(MainActivity.this);
        }
    };
}
 
Example #3
Source File: MainActivity.java    From react-native-image-filter-kit with MIT License 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
  return new ReactActivityDelegate(this, getMainComponentName()) {
    @Override
    protected ReactRootView createRootView() {
     return new RNGestureHandlerEnabledRootView(MainActivity.this);
    }
  };
}
 
Example #4
Source File: MainActivity.java    From react-native-callkeep with ISC License 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected ReactRootView createRootView() {
            return new RNGestureHandlerEnabledRootView(MainActivity.this);
        }
    };
}
 
Example #5
Source File: MainActivity.java    From react-native-screens with MIT License 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
  return new ReactActivityDelegate(this, getMainComponentName()) {
    @Override
    protected ReactRootView createRootView() {
      return new RNGestureHandlerEnabledRootView(MainActivity.this);
    }
  };
}
 
Example #6
Source File: MainActivity.java    From react-native-android-activity with MIT License 5 votes vote down vote up
/**
 * We override to provide launch options that we can read in JavaScript (see buildType).
 */
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected Bundle getLaunchOptions() {
            Bundle launchOptions = new Bundle();
            launchOptions.putString("buildType", BuildConfig.BUILD_TYPE);
            return launchOptions;
        }
    };
}
 
Example #7
Source File: MainActivity.java    From react-native-tesseract-ocr with MIT License 5 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected ReactRootView createRootView() {
            return new RNGestureHandlerEnabledRootView(MainActivity.this);
        }
    };
}
 
Example #8
Source File: VinciActivity.java    From vinci with Apache License 2.0 4 votes vote down vote up
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new VinciActivituDelegate(this, Vinci.getVinciConfig().getMainComponentName());
}