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

Nurseyit Tursunkulov

01/07/2021, 10:03 AM
p

patrick

01/07/2021, 10:31 AM
I think what you want is to draw behind the status bar right? ->
WindowCompat.setDecorFitsSystemWindows(window, false)
in your activity. Take a look at the Jetcaster Google Sample (https://github.com/android/compose-samples/tree/main/Jetcaster) it is drawing behind the statusbar. https://github.com/chrisbanes/accompanist/tree/main/insets can also help you to account for paddings/ insets.
Actually JetSnack might be even better of an example for you: https://github.com/android/compose-samples/tree/main/Jetsnack It draws content behind the status bar and changes the color of the status bar to a semitransparent color, so exactly the effect you’re looking for. Take a look at https://github.com/android/compose-samples/blob/main/Jetsnack/app/src/main/java/com/example/jetsnack/ui/utils/SystemUi.kt
n

Nurseyit Tursunkulov

01/07/2021, 11:02 AM
I tried but it is not working
s

Shakil Karim

01/07/2021, 11:05 AM
@patrick Where in the sample, Status bar color is set I can't find it?
12 Views