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

tylerwilson

03/11/2024, 3:50 PM
Using the new-ish Material 3 BottomSheet in compose mp, it goes under the android button bar (with the back, home and recent buttons) and also overlaps the iOS pull up swipe control. Is there a way to have it inset to the system boundaries? (It also seems to overlap the top system controls too much too). Thank you.
p

Peter

03/11/2024, 5:18 PM
I have no idea about KMP, but are you maybe missing
Modifier.navigationBarsPadding()
? Or maybe
windowInsets
parameter in bottom sheet?
s

Stylianos Gakis

03/11/2024, 5:59 PM
Yeah the sheet takes in insets, but it's a bit odd by default. If you put the bottom insets in the entire sheet, then the entire sheet is moved up, so you will have a "gap" at the bottom where your system nav bar is. Same with insets on the other sides but with the darkening it does to the rest of the screen. That background color gets cutoff by the insets, and if you do not pass them then if the sheet content grows tall enough then the sheet will go behind your top status bar then. It's a very awkward thing to work with the last time I checked.
😕 1