I was using ModalBottomSheet like this: ```ModalBo...
# compose
v
I was using ModalBottomSheet like this:
Copy code
ModalBottomSheetLayout(
    sheetContent = {
        // sheet content
    }
) {
   // content of rest of the screen
}
So when I trigger
modalBottomSheetState.show()
, sheet gets visible and blocks screen behind it but the
back button is not closing the sheet
So I created composable and added it to navigation, but now sheet is
taking fullscreen, regardless of sheet content and modifier.height()
, so how can I achieve behaviour like bottom sheet blocking back screen and navigating back
d
I don't know the right answer, but you probably can use https://github.com/airbnb/Showkase/blob/master/showkase/src/main/java/com/airbnb/android/showkase/ui/BackButtonHandler.kt and update
sheetState
on back button press
The first one works for me, I don't know if there are any differences between the two
v
I will try Backpress handler and tell
s
Add a dependency for
androidx.activity:activity-compose:1.3.0-alpha02
to use the
BackHandler
Adam mentioned. https://developer.android.com/jetpack/androidx/releases/activity#1.3.0-alpha02
☝️ 1
v
Thanks, trying this