Repository navigation
Start the app on a splash that matches its light or dark theme - #115
Merged
Merged
Conversation
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.
Closed
This branch was previously deployed
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.
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
MainActivitycopies Appearance's Light, Dark or System into the app's own night mode (UiModeManager.setApplicationNightMode, with AUTO meaning "follow the phone"). It also handlesuiModeitself, so changing Appearance doesn't recreate it. The splash theme moves toTheme.SplashScreen.IconBackground, so the white mark keeps its dark launcher circle on the white splash.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.devwith 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.scripts/check.sh :apppasses. 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