https://kotlinlang.org logo
Title
b

Bradleycorn

06/20/2022, 3:40 PM
👋 Hi all! I’m tying to setup a transparent status bar, via the Accompanist SystemUIController, with no luck. Hopefully someone can tell me what I’m doing wrong …. My Activity’s
onCreate
looks like this:
WindowCompat.setDecorFitsSystemWindows(window, false)

setContent {
    MyAppTheme {
        val systemUIController = rememberSystemUiController()
        SideEffect {
            systemUIController.setStatusBarColor(
                color = Color.Transparent,
                darkIcons = true
            )
        }
   }
}
But the status bar is rendered as solid white, as shown in this screenshot (note how the text at the top is cut off as it scrolls under the status bar)
c

Colton Idle

06/20/2022, 11:51 PM
You still have to call this line, and then you're set. More info here if you wanna get deep into it, but yeah. add this and then you're set.

https://www.youtube.com/watch?v=moYIjqFMi0o

j

Jan Skrasek

06/21/2022, 5:20 AM
definitely update to latest stable androidx.core, there were some bugs before.