Fix theme selector

This commit is contained in:
CappielloAntonio 2021-12-06 10:56:12 +01:00
parent 08c1b03d84
commit bcc95f2ef0
4 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,7 @@
package com.cappielloantonio.play.helper;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatDelegate;
@ -13,6 +14,8 @@ public class ThemeHelper {
public static final String DEFAULT_MODE = "default";
public static void applyTheme(@NonNull String themePref) {
Log.i(TAG, "+++ applyTheme: " + themePref);
switch (themePref) {
case LIGHT_MODE: {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);