Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

MainActivity.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.budgetizr;
  2. import android.os.Bundle;
  3. import com.facebook.react.ReactActivity;
  4. import com.facebook.react.ReactActivityDelegate;
  5. import com.facebook.react.ReactRootView;
  6. import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
  7. import expo.modules.ReactActivityDelegateWrapper;
  8. public class MainActivity extends ReactActivity {
  9. @Override
  10. protected void onCreate(Bundle savedInstanceState) {
  11. // Set the theme to AppTheme BEFORE onCreate to support
  12. // coloring the background, status bar, and navigation bar.
  13. // This is required for expo-splash-screen.
  14. setTheme(R.style.AppTheme);
  15. super.onCreate(null);
  16. }
  17. /**
  18. * Returns the name of the main component registered from JavaScript.
  19. * This is used to schedule rendering of the component.
  20. */
  21. @Override
  22. protected String getMainComponentName() {
  23. return "main";
  24. }
  25. @Override
  26. protected ReactActivityDelegate createReactActivityDelegate() {
  27. return new ReactActivityDelegateWrapper(
  28. this,
  29. new ReactActivityDelegate(this, getMainComponentName()) {
  30. @Override
  31. protected ReactRootView createRootView() {
  32. return new RNGestureHandlerEnabledRootView(MainActivity.this);
  33. }
  34. });
  35. }
  36. }