Repository navigation
Conversation
The app follows the system's dark mode with no way to choose otherwise. A Theme row under Language in the settings now picks between As in the system (the default, unchanged behaviour), Light and Dark. The choice is stored with the other settings and applied in App.onCreate, before the first screen is made, through AppCompatDelegate.setDefaultNightMode. Strings are added for every language the app ships.
Owner
|
Hi. I’ll include this in the next releases. Thanks! |
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.
What
The app always follows the system's dark mode. There is no way to have APK Toolbox dark while the rest of the phone is light, or the other way around.
This adds a Theme row to the settings, right under Language, built the same way: a heading, a one-line description and a button that opens the usual pick list.
How
AppThemeenum (settings/AppTheme.kt) maps each choice to anAppCompatDelegatenight mode.AppSettings.themeunder the keytheme.App.onCreateapplies the stored choice before the first activity is created, so the app never opens in one theme and then flips to the other.AppCompatDelegate.setDefaultNightModeis called and the open screens are rebuilt in the new theme. The theme keepsTheme.Material3Expressive.DynamicColors.DayNight, so dynamic colours still work in both modes.ic_themeicon (a Material palette icon).Testing