Is there a way to show image (or anything) below s...
# compose
a
Is there a way to show image (or anything) below statusbar?
t
I think that Compose draw behind status bar by default. It's not visible there because your status bar color is not transparent.
a
Uhmmm, so change it by themes.xml?
t
See OWL sample and it Detaisl screen where the image is behind status bar: https://github.com/android/compose-samples/tree/main/Owl
c
Could I see the full picture?
😆 2
l
You need to set the statusBar translucent in your themes.xml
☝️ 2
just add
<item name="android:windowTranslucentStatus">true</item>
to your themes.xml (might be needed for dark mode also)
d
l
Isn't https://chrisbanes.github.io/accompanist/insets/ made for this?
It will help having the right statusBarPadding, but no getting the translucent statusBar
t
Insets are used to work with system "spaces". No to change its content
d
have you seen https://github.com/android/compose-samples/blob/main/Jetsnack/app/src/main/java/com/example/jetsnack/ui/utils/SystemUi.kt ? I think it shows how to make system bars transparent without xml
👍 1
l
Too bad it isn't provided inside Compose. StatusBar are still a nightmare working with
c
Yeah. Status bars and stuff are still painful. But basically try to just set them to transparent. And then you need to request your app to be laid out behind the status bars. So it's pretty much a two line change.