More theming
This commit is contained in:
parent
c0e4b9bb38
commit
59a0d91679
@ -56,6 +56,11 @@ class MainActivity : BaseActivity() {
|
||||
lateinit var tabAnimator: TabsAnimator
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
/*delegate.setLocalNightMode(when (preferences.theme()) {
|
||||
1 -> MODE_NIGHT_NO
|
||||
2, 3, 4 -> MODE_NIGHT_YES
|
||||
else -> MODE_NIGHT_FOLLOW_SYSTEM
|
||||
})*/
|
||||
setDefaultNightMode(when (preferences.theme()) {
|
||||
1 -> MODE_NIGHT_NO
|
||||
2, 3, 4 -> MODE_NIGHT_YES
|
||||
@ -73,7 +78,7 @@ class MainActivity : BaseActivity() {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
//AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO)
|
||||
|
||||
setContentView(R.layout.main_activity)
|
||||
|
||||
setSupportActionBar(toolbar)
|
||||
|
@ -61,12 +61,7 @@ class SettingsGeneralController : SettingsController() {
|
||||
defaultValue = "5"
|
||||
summary = "%s"
|
||||
|
||||
onChange {newValue ->
|
||||
AppCompatDelegate.setDefaultNightMode(when (newValue) {
|
||||
"1" -> AppCompatDelegate.MODE_NIGHT_NO
|
||||
"2", "3", "4" -> AppCompatDelegate.MODE_NIGHT_YES
|
||||
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
|
||||
})
|
||||
onChange {
|
||||
activity?.recreate()
|
||||
true
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
<item name="android:listDivider">@drawable/line_divider_dark</item>
|
||||
|
||||
<!-- Themes -->
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<!--==============-->
|
||||
<!-- Amoled Theme -->
|
||||
<!--==============-->
|
||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base">
|
||||
<!-- Attributes specific for SDK 21 and up -->
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<!--==============-->
|
||||
<!-- Amoled Theme -->
|
||||
<!--==============-->
|
||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base">
|
||||
<!-- Attributes specific for SDK 21 and up -->
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
@ -58,15 +58,6 @@
|
||||
<item name="android:colorBackground">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Reader" parent="Theme.Base.Reader.Dark">
|
||||
<!-- Attributes specific for SDK 16 to SDK 20 -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Reader.Light" parent="Theme.Base.Reader.Light">
|
||||
<!-- Attributes specific for SDK 16 to SDK 20 -->
|
||||
</style>
|
||||
|
||||
|
||||
<!--===============-->
|
||||
<!-- Launch Screen -->
|
||||
<!--===============-->
|
||||
|
Loading…
Reference in New Issue
Block a user