Skip to content

fix(theme): make AppTheme respect dark mode to avoid splash flash - #433

Open
xhon-pelushi wants to merge 1 commit into
DicioTeam:mainfrom
xhon-pelushi:fix/413-dark-theme-splash-flash
Open

fix(theme): make AppTheme respect dark mode to avoid splash flash#433
xhon-pelushi wants to merge 1 commit into
DicioTeam:mainfrom
xhon-pelushi:fix/413-dark-theme-splash-flash

Conversation

@xhon-pelushi

Copy link
Copy Markdown

Fixes #413

AppTheme (the app's android:theme, so also 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.

Adds a values-night variant of AppTheme parented on
android:Theme.Material.NoActionBar, so the launch window background
follows 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

  • Built and ran on a real emulator (Pixel 7, Android 15).
  • Before/after on-device comparison with dark mode forced via
    adb shell cmd uimode night yes: before the fix, cold launch
    shows a bright near-white background; after, it's dark grey
    matching the rest of the app.
  • :app:assembleDebug succeeds with the new resource file.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bright splash screen flashing in dark setting.

1 participant