[UI] Fixed light navigation bar issues
This commit is contained in:
parent
558f61e905
commit
dc0c4d2046
2 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ fun AppCompatActivity.setLightStatusBarAuto(bgColor: Int) {
|
|||
|
||||
fun AppCompatActivity.setLightNavigationBar(enabled: Boolean) {
|
||||
if (!ATHUtil.isWindowBackgroundDark(this) and ThemeStore.coloredNavigationBar(this)) {
|
||||
ATH.setLightNavigationbar(this, enabled)
|
||||
ATH.setLightNavigationBar(this, enabled)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,18 +34,18 @@ object ATH {
|
|||
}
|
||||
}
|
||||
|
||||
fun setLightNavigationbar(activity: Activity, enabled: Boolean) {
|
||||
fun setLightNavigationBar(activity: Activity, enabled: Boolean) {
|
||||
activity.window.apply {
|
||||
navigationBarColor = Color.TRANSPARENT
|
||||
WindowInsetsControllerCompat(
|
||||
this,
|
||||
decorView
|
||||
).isAppearanceLightNavigationBars = enabled
|
||||
navigationBarColor = Color.TRANSPARENT
|
||||
}
|
||||
}
|
||||
|
||||
fun setLightNavigationBarAuto(activity: Activity, bgColor: Int) {
|
||||
setLightNavigationbar(activity, ColorUtil.isColorLight(bgColor))
|
||||
setLightNavigationBar(activity, ColorUtil.isColorLight(bgColor))
|
||||
}
|
||||
|
||||
fun setNavigationBarColor(activity: Activity, color: Int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue