The "Theme" setting: follow the system, always dark or always light.
More...
|
| static int | nightMode (String storedValue) |
| |
|
static String | fromLegacyDarkMode (boolean darkMode) |
| | The value the former check box maps to: on was "always dark", off was "use the system settings".
|
| |
| static boolean | migrateLegacyDarkMode (SharedPreferences preferences, String legacyKey, String key) |
| | To be called once at app start, after the preference defaults were applied: an install updated from a version with the check box has no value under the new key and keeps the look it had.
|
| |
|
|
static final String | STORED_SYSTEM = "system" |
| | Follow the system setting.
|
| |
|
static final String | STORED_DARK = "dark" |
| | Always dark.
|
| |
|
static final String | STORED_LIGHT = "light" |
| | Always light.
|
| |
|
static final String | DEFAULT_STORED_VALUE = STORED_DARK |
| | What a fresh install gets (the former check box was on by default); also the fallback for unknown values.
|
| |
The "Theme" setting: follow the system, always dark or always light.
Replaces the former on/off "Dark mode" check box (stored under another key as a boolean).
◆ migrateLegacyDarkMode()
| static boolean de.yaacc.settings.ThemeChoice.migrateLegacyDarkMode |
( |
SharedPreferences | preferences, |
|
|
String | legacyKey, |
|
|
String | key ) |
|
static |
To be called once at app start, after the preference defaults were applied: an install updated from a version with the check box has no value under the new key and keeps the look it had.
- Returns
- true if a value was migrated
◆ nightMode()
| static int de.yaacc.settings.ThemeChoice.nightMode |
( |
String | storedValue | ) |
|
|
static |
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/settings/ThemeChoice.java