diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index dde82c946..05d6f1837 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -71,6 +71,7 @@ class App : Application() { fun applyTheme() { if (AppConfig.isNightTheme) { ThemeStore.editTheme(this) + .coloredNavigationBar(true) .primaryColor( getPrefInt(PreferKey.cNPrimary, getCompatColor(R.color.md_blue_grey_600)) ).accentColor( @@ -82,6 +83,7 @@ class App : Application() { ).apply() } else { ThemeStore.editTheme(this) + .coloredNavigationBar(true) .primaryColor( getPrefInt(PreferKey.cPrimary, getCompatColor(R.color.md_indigo_800)) ).accentColor( diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index e0d4713d7..e98c7cdea 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -107,6 +107,7 @@ abstract class BaseActivity( } else if (theme == Theme.Light) { ATH.setLightStatusBar(this, true) } + ATH.setNavigationBarColorAuto(this) } open fun observeLiveBus() { diff --git a/app/src/main/java/io/legado/app/lib/theme/ThemeStore.kt b/app/src/main/java/io/legado/app/lib/theme/ThemeStore.kt index 415938c22..4259b6a7c 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ThemeStore.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ThemeStore.kt @@ -237,7 +237,10 @@ private constructor(private val mContext: Context) : ThemeStoreInterface { fun navigationBarColor(context: Context): Int { return if (!coloredNavigationBar(context)) { Color.BLACK - } else prefs(context).getInt(ThemeStorePrefKeys.KEY_NAVIGATION_BAR_COLOR, primaryColor(context)) + } else prefs(context).getInt( + ThemeStorePrefKeys.KEY_NAVIGATION_BAR_COLOR, + bottomBackground(context) + ) } @CheckResult