mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
Fix code style
This commit is contained in:
parent
ff1f4ef106
commit
99135a0e0d
7 changed files with 28 additions and 12 deletions
|
|
@ -16,19 +16,14 @@ public class ThemeHelper {
|
|||
public static void applyTheme(@NonNull String themePref) {
|
||||
switch (themePref) {
|
||||
case LIGHT_MODE: {
|
||||
Log.d(TAG, "applyTheme: LIGHT");
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
break;
|
||||
}
|
||||
case DARK_MODE: {
|
||||
Log.d(TAG, "applyTheme: DARK");
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Log.d(TAG, "applyTheme: SYSTEM");
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue