MainActivity.java 808 B

123456789101112131415161718192021222324252627
  1. package com.kangaroo;
  2. import com.facebook.react.ReactActivity;
  3. import com.facebook.react.ReactActivityDelegate;
  4. import com.facebook.react.ReactRootView;
  5. import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
  6. public class MainActivity extends ReactActivity {
  7. /**
  8. * Returns the name of the main component registered from JavaScript. This is used to schedule
  9. * rendering of the component.
  10. */
  11. @Override
  12. protected String getMainComponentName() {
  13. return "kangaroo";
  14. }
  15. @Override
  16. protected ReactActivityDelegate createReactActivityDelegate() {
  17. return new ReactActivityDelegate(this, getMainComponentName()){
  18. @Override
  19. protected ReactRootView createRootView() {
  20. return new RNGestureHandlerEnabledRootView(MainActivity.this)
  21. }
  22. };
  23. }
  24. }