We have some problems with the statusbarpadding ap...
# compose
c
We have some problems with the statusbarpadding appearing to be 0 only on some devices… so far only observed on Android 10 (Pixel XL Emulator and Xiaomi real device) but not on higher APIs … has anybody come across this / is this a known issue?
👀 2
a
Can you report this as a bug, preferably with a sample and the emulator setup you’re using to reproduce? Feel free to link here when created! https://issuetracker.google.com/issues/new?component=612128 I’ve seen some similar looking issues in this area, and there’s also been a few changes in Compose itself that might impact what you’re seeing.
c
I’ll try to make a sample 👍
a
@Simon Hardt ⬆️
👍 1
It seems to work correctly when using the paddings inside of
Copy code
setContent { ... }
in an
Activity
but breaks when using a
ComposeView
inside of a
Fragment
to host the compose content
c
@Alex Vanyo https://issuetracker.google.com/236862874 Inconsistent fitsSystemWindows Behaviour across API Levels / statusBarsPadding not working under all circumstances / https://github.com/meesec/TestApplication
a
Thanks for the issue! There’s not really anything Compose can do here, I’ve more detailed explanation in the issue, as you’ve discovered into how funky insets can be with the
fitsSystemWindows
tag.
@Alex Fragments add a whole extra layer of fun, which might be different than the above issue. Is there a sample/issue that you’ve reported for that?
c
@Alex Vanyo thanks for the detailed explanation 👍 @Alex is on my team, he was also speculating on a possible root cause before we extracted the sample 👍
a
Phew, good to hear, and hope that helps! Every time I hear about an insets issue I have the fear that there’s some new edge case that isn’t properly handled or mitigated 😅