Skip to content

Commit

Permalink
feat: add back splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-xiaowei committed Nov 29, 2024
1 parent f1ee22f commit 906ea6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center">
<item
android:layout_gravity="center"
android:width="@dimen/splash_screen_icon_size"
android:height="@dimen/splash_screen_icon_size"
android:drawable="@color/ic_launcher_background"
android:drawable="@mipmap/ic_launcher_foreground"
android:gravity="center" />
</layer-list>
4 changes: 3 additions & 1 deletion react-native/android/app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="android:navigationBarColor">@android:color/white</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_screen</item>
<item name="android:windowSplashScreenBackground">@android:color/white</item>
<item name="android:windowSplashScreenIconBackgroundColor">@android:color/white</item>
</style>
</resources>
</resources>
2 changes: 1 addition & 1 deletion react-native/android/app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Round app icon can take all default space -->
<dimen name="splash_screen_icon_size">0dp</dimen>
<dimen name="splash_screen_icon_size">60dp</dimen>
</resources>

0 comments on commit 906ea6c

Please sign in to comment.