inside a bottom sheet from dismissing the sheet? is it possible to disable the sheet swipe gestures within a certain boundary? (in my case I want to disable them over the
LazyColumn
)
m
Mayank Saini
09/21/2021, 6:02 AM
@Ian Lake Is there a way to achieve this? I am facing similar issue
Mayank Saini
09/21/2021, 6:09 AM
Copy code
val bottomSheetScaffoldState =
rememberModalBottomSheetState(ModalBottomSheetValue.Hidden, confirmStateChange = {
it != ModalBottomSheetValue.Hidden
})
This way the sheet won’t be dismissed but it still changes position which I don’t want,
j
Jason Ankers
09/21/2021, 6:10 AM
This is an old question, you could do something like this to disable nested scroll:
Copy code
Modifier.nestedScroll(remember {
object : NestedScrollConnection {
override fun onPostScroll(
consumed: Offset,
available: Offset,
source: NestedScrollSource
) = available
override suspend fun onPostFling(
consumed: Velocity,
available: Velocity,
) = available
}
})