diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt index 792f6a253..6f7f40e43 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt | |||
| @@ -5,6 +5,7 @@ package org.yuzu.yuzu_emu.utils | |||
| 5 | 5 | ||
| 6 | import android.content.res.Configuration | 6 | import android.content.res.Configuration |
| 7 | import android.graphics.Color | 7 | import android.graphics.Color |
| 8 | import android.os.Build | ||
| 8 | import androidx.annotation.ColorInt | 9 | import androidx.annotation.ColorInt |
| 9 | import androidx.appcompat.app.AppCompatActivity | 10 | import androidx.appcompat.app.AppCompatActivity |
| 10 | import androidx.appcompat.app.AppCompatDelegate | 11 | import androidx.appcompat.app.AppCompatDelegate |
| @@ -23,7 +24,13 @@ object ThemeHelper { | |||
| 23 | setThemeMode(activity) | 24 | setThemeMode(activity) |
| 24 | when (Theme.from(IntSetting.THEME.getInt())) { | 25 | when (Theme.from(IntSetting.THEME.getInt())) { |
| 25 | Theme.Default -> activity.setTheme(R.style.Theme_Yuzu_Main) | 26 | Theme.Default -> activity.setTheme(R.style.Theme_Yuzu_Main) |
| 26 | Theme.MaterialYou -> activity.setTheme(R.style.Theme_Yuzu_Main_MaterialYou) | 27 | Theme.MaterialYou -> { |
| 28 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
| 29 | activity.setTheme(R.style.Theme_Yuzu_Main_MaterialYou) | ||
| 30 | } else { | ||
| 31 | activity.setTheme(R.style.Theme_Yuzu_Main) | ||
| 32 | } | ||
| 33 | } | ||
| 27 | } | 34 | } |
| 28 | 35 | ||
| 29 | // Using a specific night mode check because this could apply incorrectly when using the | 36 | // Using a specific night mode check because this could apply incorrectly when using the |