Skip to content

Start the app on a splash that matches its light or dark theme - #115

Merged
Tarquinen merged 1 commit into
devfrom
splash-day-night
Nov 17, 2026
Merged

Tarquinen merged 1 commit into
devfrom
splash-day-night

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Launching the app in a light theme started on a black splash, then Android's splash exit drew its reveal in that black: a dark radial wipe into a white screen, with the navigation bar handle still light. Dark launches dipped through black between the icon's fade and the app.

Now the splash and window background are the default palette's canvas, white or #161616, so the system's exit has nothing dark to reveal. A day/night resource follows the phone's dark mode, not the in-app one, so MainActivity copies Appearance's Light, Dark or System into the app's own night mode (UiModeManager.setApplicationNightMode, with AUTO meaning "follow the phone"). It also handles uiMode itself, so changing Appearance doesn't recreate it. The splash theme moves to Theme.SplashScreen.IconBackground, so the white mark keeps its dark launcher circle on the white splash.

  • Cold starts on the API 36 emulator, checked frame by frame: light and dark phone, paired and unpaired, in-app Light on a dark phone, in-app Dark on a light phone. None passes through black, and the handle matches from the first frame.
  • Switching Appearance in Settings: no recreate (no wm_on_create_called, same process), the page stays put, one-frame swap as before. Switching the phone's dark mode with the app open still cross-dissolves and keeps the page.
  • The window background keeps the colour it was created with when the mode changes in place, but the app's full-window surface always covers it. Checked by starting in one mode, switching to the other (both through Settings and through the phone), then opening and closing the keyboard, overscrolling the drawer, opening Settings, holding predictive back in Settings and at the root, rotating, and resizing the display: no frame shows the old colour. Picture-in-picture during a call wasn't checked.
  • Clearing app data resets the night mode, so the next start follows the phone.
  • Upgrading from dev with in-app Dark on a light phone: the first launch after the update still has a white splash with a white-to-dark reveal, because the night mode is only set once the app runs. From the second launch it's dark. The mirror case (in-app Light, dark phone) gets a #161616 splash once instead of black.
  • Share and Ask OpenCode follow the in-app choice too, since their DayNight themes read the same night mode.
  • Other themes (Tokyo Night, Catppuccin and so on) get the light or dark canvas on the splash, not their own background.
  • scripts/check.sh :app passes. Not checked on a phone.

The first video is a cold start on a light phone, before and after, at real speed and then at 1/4 speed. The second is in-app Dark on a light phone, the case a phone-only fix would have made worse.

splash-light-before-after.mp4
splash-in-app-dark-before-after.mp4

The splash and window background were hard-coded black, so a light
launch started black and the system's splash exit drew its reveal in
that black: a dark radial wipe into a white screen, with the navigation
handle still light. A dark launch dipped through black between the
icon's fade and the app.

The splash and window background are now a day/night colour, the
default palette's canvas (white, #161616). The splash's night mode
follows the phone, so MainActivity mirrors Appearance's Light, Dark or
System into the app's own night mode (UiModeManager
.setApplicationNightMode: YES, NO, or AUTO to follow the phone), and
handles uiMode itself so changing Appearance doesn't recreate it. The
splash theme is Theme.SplashScreen.IconBackground so the white mark
keeps its dark launcher circle on the white splash.

Verified on the API 36 emulator, frame by frame: cold starts on a light
and a dark phone, paired and unpaired, in-app Light on a dark phone and
in-app Dark on a light phone; Appearance switches and system dark mode
switches with the app open (no recreate, page kept); clearing data
resets the night mode; Share and Ask OpenCode follow the in-app choice.
The first launch after updating, for someone whose in-app choice differs
from the phone's, still uses the phone's mode once. scripts/check.sh
:app passes.
@Tarquinen
Tarquinen merged commit e6f9684 into dev Nov 17, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 18, 2026

This branch was previously deployed

1 inactive deployment
release — 16935a8f Deployed Nov 17, 2026 by Tarquinen via check #390
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.

1 participant