https://kotlinlang.org logo
#compose
Title
# compose
r

Rihards

03/07/2023, 8:55 PM
How can I change color for system bars? My app doesn’t have dark mode, but I need to set up black bars in one view - when I try to do that with accompanist - both bars remain white, but icons also turn white.
Not changing also with this code:
Copy code
val view = LocalView.current

SideEffect {
    val window = (view.context as Activity).window
    window.statusBarColor = ExpectedColor.toArgb()
    window.navigationBarColor = ExpectedColor.toArgb()
}
a

AndreiMares

03/08/2023, 7:46 AM
Hello, try using systemUiController in your sideEffect and use method setStatusBarColor(color = your color)
48 Views