Skip to content

Commit c28c732

Browse files
authored
feat: splashscreen (#41)
### Summary Added splashscreen for the host app fot both platforms
1 parent 6aecd7a commit c28c732

23 files changed

Lines changed: 387 additions & 9 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typecheck": "yarn workspaces foreach run typecheck",
2929
"lint": "yarn workspaces foreach run lint",
3030
"test": "yarn workspaces foreach run test",
31-
"adbreverse": "adb reverse tcp:3000 tcp:3000 && adb reverse tcp:9000 tcp:9000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:9002 tcp:9002 && adb reverse tcp:9003 tcp:9003"
31+
"adbreverse": "adb reverse tcp:3000 tcp:3000 && adb reverse tcp:8081 tcp:8081 && adb reverse tcp:9000 tcp:9000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:9002 tcp:9002 && adb reverse tcp:9003 tcp:9003"
3232
},
3333
"packageManager": "yarn@3.2.1",
3434
"devDependencies": {

packages/host/android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ dependencies {
161161
implementation("com.facebook.react:react-android")
162162

163163
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
164-
164+
implementation("androidx.core:core-splashscreen:1.0.0")
165+
165166
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
166167
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
167168
exclude group:'com.squareup.okhttp3', module:'okhttp'

packages/host/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/BootTheme">
1212
<activity
1313
android:name=".MainActivity"
1414
android:label="@string/app_name"

packages/host/android/app/src/main/java/com/host/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
import com.facebook.react.ReactActivityDelegate;
66
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
77
import com.facebook.react.defaults.DefaultReactActivityDelegate;
8+
import com.zoontek.rnbootsplash.RNBootSplash;
89

910
public class MainActivity extends ReactActivity {
1011

1112
// react-native-screens
1213
@Override
1314
protected void onCreate(Bundle savedInstanceState) {
15+
RNBootSplash.init(this);
1416
super.onCreate(null);
1517
}
1618
/**
25.9 KB
Loading
13.8 KB
Loading
41.6 KB
Loading
93.6 KB
Loading
144 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<color name="bootsplash_background">#FFFFFF</color>
3+
</resources>

0 commit comments

Comments
 (0)