mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 22:39:50 +00:00
3.2.7
- Improved theme.
This commit is contained in:
parent
fe8dbc2b93
commit
b53e72be1a
18 changed files with 423 additions and 56 deletions
|
|
@ -515,4 +515,13 @@ public class UIUtils {
|
|||
return luminance > 186;
|
||||
}
|
||||
|
||||
public static void setDarkOrLight(int mode) {
|
||||
if (mode == MainSettingsManager.THEME_LIGHT) {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
} else if (mode == MainSettingsManager.THEME_DARK) {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
} else {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue