-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from obytes/feat/upgradeExpo50
feat: upgrade expo to version 50
- Loading branch information
Showing
49 changed files
with
5,186 additions
and
4,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
android/app/src/debug/java/com/obytes/development/ReactNativeFlipper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
android/app/src/main/java/com/obytes/development/MainActivity.java
This file was deleted.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
android/app/src/main/java/com/obytes/development/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.obytes.development | ||
|
||
import android.os.Build | ||
import android.os.Bundle | ||
|
||
import com.facebook.react.ReactActivity | ||
import com.facebook.react.ReactActivityDelegate | ||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled | ||
import com.facebook.react.defaults.DefaultReactActivityDelegate | ||
|
||
import expo.modules.ReactActivityDelegateWrapper | ||
|
||
class MainActivity : ReactActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
// Set the theme to AppTheme BEFORE onCreate to support | ||
// coloring the background, status bar, and navigation bar. | ||
// This is required for expo-splash-screen. | ||
setTheme(R.style.AppTheme); | ||
super.onCreate(null) | ||
} | ||
|
||
/** | ||
* Returns the name of the main component registered from JavaScript. This is used to schedule | ||
* rendering of the component. | ||
*/ | ||
override fun getMainComponentName(): String = "main" | ||
|
||
/** | ||
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] | ||
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled] | ||
*/ | ||
override fun createReactActivityDelegate(): ReactActivityDelegate { | ||
return ReactActivityDelegateWrapper( | ||
this, | ||
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, | ||
object : DefaultReactActivityDelegate( | ||
this, | ||
mainComponentName, | ||
fabricEnabled | ||
){}) | ||
} | ||
|
||
/** | ||
* Align the back button behavior with Android S | ||
* where moving root activities to background instead of finishing activities. | ||
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a> | ||
*/ | ||
override fun invokeDefaultOnBackPressed() { | ||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { | ||
if (!moveTaskToBack(false)) { | ||
// For non-root activities, use the default implementation to finish them. | ||
super.invokeDefaultOnBackPressed() | ||
} | ||
return | ||
} | ||
|
||
// Use the default back button implementation on Android S | ||
// because it's doing more than [Activity.moveTaskToBack] in fact. | ||
super.invokeDefaultOnBackPressed() | ||
} | ||
} |
80 changes: 0 additions & 80 deletions
80
android/app/src/main/java/com/obytes/development/MainApplication.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.