Ahmed Mourad
08/08/2023, 11:37 PMWindowCompat.setDecorFitsSystemWindows(window, false)
and this to the activity in the manifest:
android:windowSoftInputMode="adjustResize"
and adding Modifier.safeDrawingPadding()
to my layout, this ended up with the bottom nav bar height being cropped from the actual screen (first image), my assumption is it's because setDecorFitsSystemWindows
only allowed drawing behind the status bar but not the nav bar.
So I tried removing the nav bar insets cause I can probably handle those even if as not as gracefully as promised by the WindowInsets api, so I replaced `safeDrawingPadding with:
Modifier.consumeWindowInsets(WindowInsets.systemBars.only(WindowInsetsSides.Bottom))
.systemBarsPadding()
and everything was fine until I decided to add a textfield to my bottom sheet, so on my Android 8 device the bottom sheet doesn't care about the ime appearing at all and ends up living behind it (second image), and on my api 30 emulator i'm getting double insets when the ime is visible (third image)
this's from a kmp project but the bottom sheet lives entirely in androidMain and uses the following dependencies
api("androidx.compose.material3:material3:1.1.1")
api("androidx.compose.material3:material3-window-size-class:1.1.1")
am I doing something wrong here? if it's a bug any workarounds? thank you!Ahmed Mourad
08/08/2023, 11:40 PMIan Lake
08/09/2023, 5:06 PMModalBottomSheet
, so you'll want to upgrade first and ensure that you're using those APIs: https://developer.android.com/jetpack/androidx/releases/compose-material3#1.2.0-alpha02Ahmed Mourad
08/09/2023, 9:22 PMIan Lake
08/09/2023, 9:25 PMAhmed Mourad
08/09/2023, 9:26 PMBenjamin Mohr
08/10/2023, 8:56 AMAhmed Mourad
08/10/2023, 12:33 PM