theme: force splash icon on, fix missing glyph + white flash (#734)
- Commit
90ec1ff21ef739cd62a59a908beb5671201d6418- Author
- vayun-mathur <[email protected]>
- When
- 2026-09-22 00:07 UTC (2 months ago)
- Parents
95d354d
Diff
library/src/main/res/values-night-v33/themes.xml
diff --git a/library/src/main/res/values-night-v33/themes.xml b/library/src/main/res/values-night-v33/themes.xmlnew file mode 100644index 0000000000..c194e6da8c--- /dev/null+++ b/library/src/main/res/values-night-v33/themes.xml@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="utf-8"?>+<resources>++ <!-- API 33+ night twin of Theme.General: dark parent plus icon_preferred, mirroring+ values-night/themes.xml with the icon forced on. -->+ <style name="Theme.General" parent="android:Theme.Material.NoActionBar">+ <item name="android:windowSoftInputMode">stateUnchanged</item>+ <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>+ <item name="android:windowSplashScreenIconBackgroundColor">@color/ic_launcher_background</item>+ <item name="android:windowSplashScreenBehavior">icon_preferred</item>+ </style>+</resources>
library/src/main/res/values-night/themes.xml
diff --git a/library/src/main/res/values-night/themes.xml b/library/src/main/res/values-night/themes.xmlindex 0636d0d055..fbda826998 100644--- a/library/src/main/res/values-night/themes.xml+++ b/library/src/main/res/values-night/themes.xml@@ -2,8 +2,12 @@ <resources> <!-- Night twin of Theme.General: same style, dark Material parent, so the pre-first-frame- window is dark in dark mode instead of flashing white. -->+ window is dark in dark mode instead of flashing white. Splash attrs mirror day so the+ icon is forced on with a dark background and the white launcher disc behind it. --> <style name="Theme.General" parent="android:Theme.Material.NoActionBar"> <item name="android:windowSoftInputMode">stateUnchanged</item>+ <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>+ <item name="android:windowSplashScreenIconBackgroundColor">@color/ic_launcher_background</item>+ <!-- windowSplashScreenBehavior is API 33+; it lives in values-night-v33/themes.xml. --> </style> </resources>
library/src/main/res/values-v33/themes.xml
diff --git a/library/src/main/res/values-v33/themes.xml b/library/src/main/res/values-v33/themes.xmlnew file mode 100644index 0000000000..be39574a71--- /dev/null+++ b/library/src/main/res/values-v33/themes.xml@@ -0,0 +1,13 @@+<?xml version="1.0" encoding="utf-8"?>+<resources>++ <!-- API 33+ twin of Theme.General: the base values/themes.xml plus icon_preferred, so the+ system always draws the launcher glyph instead of following the OEM's default (which+ on some devices is an empty splash). Background and icon disc mirror the base file. -->+ <style name="Theme.General" parent="android:Theme.Material.Light.NoActionBar">+ <item name="android:windowSoftInputMode">stateUnchanged</item>+ <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>+ <item name="android:windowSplashScreenIconBackgroundColor">@color/ic_launcher_background</item>+ <item name="android:windowSplashScreenBehavior">icon_preferred</item>+ </style>+</resources>
library/src/main/res/values/themes.xml
diff --git a/library/src/main/res/values/themes.xml b/library/src/main/res/values/themes.xmlindex 068c721cf1..45145c0aa7 100644--- a/library/src/main/res/values/themes.xml+++ b/library/src/main/res/values/themes.xml@@ -3,5 +3,11 @@ <style name="Theme.General" parent="android:Theme.Material.Light.NoActionBar"> <item name="android:windowSoftInputMode">stateUnchanged</item>+ <!-- System splash (API 31+): explicit single-color background per mode, white disc+ behind the black launcher glyph, and icon forced on API 33+ where the default+ behavior can otherwise show an empty splash. -->+ <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>+ <item name="android:windowSplashScreenIconBackgroundColor">@color/ic_launcher_background</item>+ <!-- windowSplashScreenBehavior is API 33+; it lives in values-v33/themes.xml. --> </style> </resources>\ No newline at end of file