0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-10 12:55:06 +00:00

experiments with shit android 6 v2

This commit is contained in:
X1nto 2020-05-02 01:07:52 +04:00
parent 3b6d90925a
commit 7dc93a0ea1

View file

@ -33,31 +33,31 @@ class SettingsFragment : PreferenceFragmentCompat() {
when (themeSwitch.value){
"LIGHT" -> {
activity?.setTheme(R.style.LightTheme_Blue)
//activity?.setTheme(R.style.LightTheme_Blue)
//activity?.recreate()
recreate()
}
"DARK" -> {
activity?.setTheme(R.style.DarkTheme_Blue)
//activity?.setTheme(R.style.DarkTheme_Blue)
//activity?.recreate()
recreate()
}
"FOLLOW" -> {
when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
Configuration.UI_MODE_NIGHT_YES ->{
activity?.setTheme(R.style.DarkTheme_Blue)
//activity?.setTheme(R.style.DarkTheme_Blue)
//activity?.recreate()
recreate()
}
Configuration.UI_MODE_NIGHT_NO -> {
activity?.setTheme(R.style.LightTheme_Blue)
//activity?.setTheme(R.style.LightTheme_Blue)
//activity?.recreate()
recreate()
}
}
}
else -> {
activity?.setTheme(R.style.LightTheme_Blue)
//activity?.setTheme(R.style.LightTheme_Blue)
//activity?.recreate()
recreate()
}