Modern Apps git

← Modern-Apps.git

theme: adaptive Theme.General via night twin, drop custom colors (#734)

Commit
b01a58707c3223cb680bdc24be82987a1c544b12
Author
vayun-mathur <[email protected]>
When
2026-09-21 22:57 UTC (2 months ago)
Parents
305767a

Diff

library/src/main/res/values-night/launch_colors.xml
diff --git a/library/src/main/res/values-night/launch_colors.xml b/library/src/main/res/values-night/launch_colors.xmldeleted file mode 100644index e89c7ebbd0..0000000000--- a/library/src/main/res/values-night/launch_colors.xml+++ /dev/null@@ -1,6 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>-    <!-- Pre-first-frame window background, dark side of the Theme.General fix: pitch black,-         matching DynamicTheme's dark surface, so cold starts no longer flash white. -->-    <color name="launch_window_background">#000000</color>-</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.xmlnew file mode 100644index 0000000000..0636d0d055--- /dev/null+++ b/library/src/main/res/values-night/themes.xml@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="utf-8"?>+<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. -->+    <style name="Theme.General" parent="android:Theme.Material.NoActionBar">+        <item name="android:windowSoftInputMode">stateUnchanged</item>+    </style>+</resources>
library/src/main/res/values/launch_colors.xml
diff --git a/library/src/main/res/values/launch_colors.xml b/library/src/main/res/values/launch_colors.xmldeleted file mode 100644index 05eed0e45f..0000000000--- a/library/src/main/res/values/launch_colors.xml+++ /dev/null@@ -1,5 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>-    <!-- Pre-first-frame window background, light side of the Theme.General fix. -->-    <color name="launch_window_background">#FFFFFF</color>-</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 97f7b6d94f..068c721cf1 100644--- a/library/src/main/res/values/themes.xml+++ b/library/src/main/res/values/themes.xml@@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> -    <!-- Pre-first-frame window. The parent was hardcoded Light, so every cold start flashed-         white in dark mode. The background matches the system night state instead: black-         while dark, white while light, before DynamicTheme paints the first frame. -->     <style name="Theme.General" parent="android:Theme.Material.Light.NoActionBar">         <item name="android:windowSoftInputMode">stateUnchanged</item>-        <item name="android:windowBackground">@color/launch_window_background</item>     </style> </resources>\ No newline at end of file