Set status bar color on API 27+ devices

This commit is contained in:
cketti 2023-03-03 19:20:28 +01:00
parent 61e50a9238
commit 5262f6f338
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.K9.Light" parent="Theme.K9.Light.Common">
<item name="android:statusBarColor">@color/material_gray_100</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@color/material_gray_100</item>
<item name="android:windowLightNavigationBar">true</item>
</style>
<style name="Theme.K9.Dark" parent="Theme.K9.Dark.Common">
<item name="android:statusBarColor">@color/material_gray_900</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:navigationBarColor">@color/material_gray_900</item>
<item name="android:windowLightNavigationBar">false</item>
</style>
</resources>

View file

@ -141,7 +141,7 @@ class ToolbarBottomSheetDialog internal constructor(context: Context, @StyleRes
coordinator?.fitsSystemWindows = false
val flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
window.decorView.systemUiVisibility = flags
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or flags
}
}