Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Created February 11, 2019 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazrdogan/fbf633080f14383b8a2e0ddf4a6eed2a to your computer and use it in GitHub Desktop.
Save nazrdogan/fbf633080f14383b8a2e0ddf4a6eed2a to your computer and use it in GitHub Desktop.
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "Example";
}
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new ReactActivityDelegate(this, getMainComponentName()) {
+ @Override
+ protected ReactRootView createRootView() {
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+ }
+ };
+ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment