xmartlabs/gong

Statusbar color / insets in jetpack compose (main-v2)

miduch opened this issue · 1 comments

Status bar color should be set for app theme ?

https://google.github.io/accompanist/systemuicontroller/

// Remember a SystemUiController
val systemUiController = rememberSystemUiController()
val useDarkIcons = MaterialTheme.colors.isLight

SideEffect {
    // Update all of the system bar colors to be transparent, and use
    // dark icons if we're in light theme
    systemUiController.setSystemBarsColor(
        color = Color.Transparent,
        darkIcons = useDarkIcons
    )

    // setStatusBarsColor() and setNavigationBarsColor() also exist
}

And maybe its worth consideing insets/insets-ui apis in template?

https://google.github.io/accompanist/insets/#inset-aware-layouts-insets-ui
https://google.github.io/accompanist/insets/

https://google.github.io/accompanist/api/insets-ui/insets-ui/com.google.accompanist.insets.ui/

Thanks!

It was added in #202