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:
parent
3b6d90925a
commit
7dc93a0ea1
1 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue