expo-template-bare-minimum 43.0.13 → 44.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/app/src/main/java/com/helloworld/MainActivity.java +23 -8
- package/android/app/src/main/res/drawable/splashscreen.xml +2 -5
- package/android/app/src/main/res/values/colors.xml +2 -3
- package/android/app/src/main/res/values/styles.xml +1 -3
- package/ios/HelloWorld/AppDelegate.m +4 -10
- package/ios/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/brentvatne.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/package.json +6 -10
- package/__tests__/App.js +0 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
package com.helloworld;
|
|
2
2
|
|
|
3
|
+
import android.os.Build;
|
|
3
4
|
import android.os.Bundle;
|
|
4
5
|
|
|
5
6
|
import com.facebook.react.ReactActivity;
|
|
6
7
|
import com.facebook.react.ReactActivityDelegate;
|
|
7
8
|
import com.facebook.react.ReactRootView;
|
|
8
|
-
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
|
9
9
|
|
|
10
10
|
import expo.modules.ReactActivityDelegateWrapper;
|
|
11
11
|
|
|
@@ -30,13 +30,28 @@ public class MainActivity extends ReactActivity {
|
|
|
30
30
|
|
|
31
31
|
@Override
|
|
32
32
|
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
33
|
-
return new ReactActivityDelegateWrapper(
|
|
34
|
-
this,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
return new ReactActivityDelegateWrapper(this,
|
|
34
|
+
new ReactActivityDelegate(this, getMainComponentName())
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Align the back button behavior with Android S
|
|
40
|
+
* where moving root activities to background instead of finishing activities.
|
|
41
|
+
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
|
|
42
|
+
*/
|
|
43
|
+
@Override
|
|
44
|
+
public void invokeDefaultOnBackPressed() {
|
|
45
|
+
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
|
|
46
|
+
if (!moveTaskToBack(false)) {
|
|
47
|
+
// For non-root activities, use the default implementation to finish them.
|
|
48
|
+
super.invokeDefaultOnBackPressed();
|
|
39
49
|
}
|
|
40
|
-
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Use the default back button implementation on Android S
|
|
54
|
+
// because it's doing more than {@link Activity#moveTaskToBack} in fact.
|
|
55
|
+
super.invokeDefaultOnBackPressed();
|
|
41
56
|
}
|
|
42
57
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="
|
|
2
|
-
<!--
|
|
3
|
-
This file was created by '@expo/configure-splash-screen' and some of it's content shouldn't be modified by hand
|
|
4
|
-
-->
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
5
2
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
6
3
|
<item android:drawable="@color/splashscreen_background"/>
|
|
7
|
-
</layer-list>
|
|
4
|
+
</layer-list>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
|
|
4
3
|
<color name="splashscreen_background">#FFFFFF</color>
|
|
5
|
-
</resources>
|
|
4
|
+
</resources>
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
<item name="android:textColorHint">#c8c8c8</item>
|
|
9
9
|
<item name="android:textColor">@android:color/black</item>
|
|
10
10
|
</style>
|
|
11
|
-
<style name="Theme.App.SplashScreen" parent="
|
|
12
|
-
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
|
|
11
|
+
<style name="Theme.App.SplashScreen" parent="AppTheme">
|
|
13
12
|
<item name="android:windowBackground">@drawable/splashscreen</item>
|
|
14
|
-
<!-- Customize your splash screen theme here -->
|
|
15
13
|
</style>
|
|
16
14
|
</resources>
|
|
@@ -33,17 +33,11 @@ static void InitializeFlipper(UIApplication *application) {
|
|
|
33
33
|
InitializeFlipper(application);
|
|
34
34
|
#endif
|
|
35
35
|
|
|
36
|
-
RCTBridge *bridge = [
|
|
37
|
-
RCTRootView *rootView = [
|
|
38
|
-
|
|
39
|
-
if (rootViewBackgroundColor != nil) {
|
|
40
|
-
rootView.backgroundColor = [RCTConvert UIColor:rootViewBackgroundColor];
|
|
41
|
-
} else {
|
|
42
|
-
rootView.backgroundColor = [UIColor whiteColor];
|
|
43
|
-
}
|
|
44
|
-
|
|
36
|
+
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
|
|
37
|
+
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
|
|
38
|
+
rootView.backgroundColor = [UIColor whiteColor];
|
|
45
39
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
46
|
-
UIViewController *rootViewController = [
|
|
40
|
+
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
|
|
47
41
|
rootViewController.view = rootView;
|
|
48
42
|
self.window.rootViewController = rootViewController;
|
|
49
43
|
[self.window makeKeyAndVisible];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-template-bare-minimum",
|
|
3
3
|
"description": "This bare project template includes a minimal setup for using unimodules with React Native.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "44.0.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"start": "expo start --dev-client",
|
|
7
8
|
"android": "expo run:android",
|
|
8
9
|
"ios": "expo run:ios",
|
|
9
|
-
"web": "expo start --web"
|
|
10
|
-
"start": "react-native start"
|
|
10
|
+
"web": "expo start --web"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"expo": "~
|
|
14
|
-
"expo-splash-screen": "~0.
|
|
15
|
-
"expo-status-bar": "~1.
|
|
16
|
-
"expo-updates": "~0.10.13",
|
|
13
|
+
"expo": "~44.0.0-beta.0",
|
|
14
|
+
"expo-splash-screen": "~0.14.0",
|
|
15
|
+
"expo-status-bar": "~1.2.0",
|
|
17
16
|
"react": "17.0.1",
|
|
18
17
|
"react-dom": "17.0.1",
|
|
19
18
|
"react-native": "0.64.3",
|
|
20
|
-
"react-native-gesture-handler": "~1.10.2",
|
|
21
19
|
"react-native-reanimated": "~2.2.0",
|
|
22
|
-
"react-native-safe-area-context": "3.3.2",
|
|
23
|
-
"react-native-screens": "~3.8.0",
|
|
24
20
|
"react-native-web": "0.17.1"
|
|
25
21
|
},
|
|
26
22
|
"devDependencies": {
|
package/__tests__/App.js
DELETED