Skip to content

Commit

Permalink
enhance(android): enable android 12 style splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf authored and tiensonqin committed Sep 15, 2022
1 parent 46db8f5 commit 00dcf59
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions android/app/src/main/res/drawable/splash_centered.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/logoPrimary" />
<item android:drawable="@drawable/splash" android:gravity="center" />
</layer-list>

4 changes: 4 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="logoPrimary">#002b36</color>
</resources>
9 changes: 7 additions & 2 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
Expand All @@ -16,7 +16,12 @@
<item name="android:windowIsTranslucent">true</item>
</style>

<!-- App Starting -->
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item>
<item name="android:windowBackground">@drawable/splash_centered</item>

<item name="windowSplashScreenAnimationDuration">200</item>
<item name="windowSplashScreenIconBackgroundColor">@color/logoPrimary</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
</resources>

0 comments on commit 00dcf59

Please sign in to comment.