diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 21478eef8..a962ce824 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -23,7 +23,7 @@ android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/Theme.Purple.Pure" + android:theme="@style/StartupTheme" tools:targetApi="n"> if (pureThemeEnabled) R.style.BaseTheme_Pure else R.style.BaseTheme - "red" -> if (pureThemeEnabled) R.style.Theme_Red_Pure else R.style.Theme_Red - "blue" -> if (pureThemeEnabled) R.style.Theme_Blue_Pure else R.style.Theme_Blue - "yellow" -> if (pureThemeEnabled) R.style.Theme_Yellow_Pure else R.style.Theme_Yellow - "green" -> if (pureThemeEnabled) R.style.Theme_Green_Pure else R.style.Theme_Green - "purple" -> if (pureThemeEnabled) R.style.Theme_Purple_Pure else R.style.Theme_Purple - else -> if (pureThemeEnabled) R.style.Theme_Purple_Pure else R.style.Theme_Purple + "my" -> R.style.BaseTheme + "red" -> R.style.Theme_Red + "blue" -> R.style.Theme_Blue + "yellow" -> R.style.Theme_Yellow + "green" -> R.style.Theme_Green + "purple" -> R.style.Theme_Purple + else -> R.style.Theme_Purple } activity.setTheme(theme) } @@ -63,7 +63,20 @@ object ThemeHelper { PreferenceKeys.ACCENT_COLOR, "purple" ) == "my" - ) DynamicColors.applyToActivityIfAvailable(activity) + ) { + DynamicColors.applyToActivityIfAvailable(activity) + } + } + + /** + * apply the pure black/white theme + */ + private fun applyPureThemeIfEnabled(activity: Activity) { + val pureThemeEnabled = PreferenceHelper.getBoolean( + PreferenceKeys.PURE_THEME, + false + ) + if (pureThemeEnabled) activity.theme.applyStyle(R.style.Pure, true) } /** diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 4d9db8538..a0135a3a2 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -8,7 +8,7 @@ - - - - - - - - - - - - - - - - - - - -