theme tests

This commit is contained in:
X1nto 2020-05-27 17:50:45 +04:00
parent 13ed11dcb2
commit b6ad5f77e2
2 changed files with 5 additions and 6 deletions

View File

@ -18,6 +18,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="@style/LightTheme.Blue"
tools:ignore="UnusedAttribute">
<activity

View File

@ -32,13 +32,11 @@ open class ThemedActivity : AppCompatActivity() {
}
override fun onResume() {
super.onResume()
val theme = pref.getString("theme_mode", "Light")
pref = PreferenceManager.getDefaultSharedPreferences(this)
currentTheme = pref.getString("theme_mode", "Light").toString()
//if for some weird reasons we get invalid
//theme, recreate activity
if (currentTheme != theme)
recreate()
setFinalTheme(currentTheme)
super.onResume()
//set Task Header color in recents menu for
//devices that are not using pie recents