fix(theme): make AppTheme respect dark mode to avoid splash flash - #433
Open
xhon-pelushi wants to merge 1 commit into
Open
fix(theme): make AppTheme respect dark mode to avoid splash flash#433xhon-pelushi wants to merge 1 commit into
xhon-pelushi wants to merge 1 commit into
Conversation
AppTheme (used as the app's window theme, and therefore for the pre-content window background shown on cold launch) was hardcoded to android:Theme.Material.Light.NoActionBar with no dark counterpart, causing a bright white flash on cold launch even on a dark-themed device in a dark environment. Add a values-night variant of AppTheme parented on android:Theme.Material.NoActionBar, so the launch window background follows the system dark theme like the rest of the app already does. Fixes DicioTeam#413 Signed-off-by: xhon-pelushi <xhon@pelushi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #413
AppTheme(the app'sandroid:theme, so also the pre-content windowbackground shown on cold launch) was hardcoded to
android:Theme.Material.Light.NoActionBarwith no dark counterpart,causing a bright white flash on cold launch even on a dark-themed
device in a dark environment.
Adds a
values-nightvariant ofAppThemeparented onandroid:Theme.Material.NoActionBar, so the launch window backgroundfollows system dark mode like the rest of the app already does. No new
dependency, no code change — just the standard Android
resource-qualifier pattern.
Test plan
adb shell cmd uimode night yes: before the fix, cold launchshows a bright near-white background; after, it's dark grey
matching the rest of the app.
:app:assembleDebugsucceeds with the new resource file.