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