Skip to content

Commit

Permalink
Update status bar content color
Browse files Browse the repository at this point in the history
  • Loading branch information
fidloo committed Mar 22, 2021
1 parent 43fb768 commit 52aa90d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
22 changes: 0 additions & 22 deletions presentation/src/main/java/com/fidloo/flux/presentation/ui/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,4 @@ fun App(backDispatcher: OnBackPressedDispatcher, window: Window) {
fun BarsTheming(window: Window) {
window.statusBarColor = Color.TRANSPARENT
window.navigationBarColor = Color.TRANSPARENT
// window.navigationBarColor = MaterialTheme.colors.surface.toArgb()

if (!isSystemInDarkTheme()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
window.insetsController?.setSystemBarsAppearance(
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
)
window.insetsController?.setSystemBarsAppearance(
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS,
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
)
} else {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.systemUiVisibility =
window.decorView.systemUiVisibility or
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
}
}
}
}
1 change: 1 addition & 0 deletions presentation/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<style name="Theme.Flux.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
</style>

<style name="Theme.Flux.Splash" parent="Theme.Flux.NoActionBar">
Expand Down

0 comments on commit 52aa90d

Please sign in to comment.