androidandroid-jetpack-composebottom-sheetandroid-bottomsheetdialog

Prevent/Disable BottomSheetScaffold from being swiped/dragged


I have a BottomSheetScaffold(), on button push the bottomsheet is coming up, all is working fine, but i want to prevent the user from swiping down the bottomsheet. Instead a button on the bottomsheet is use to close it on click.

I see the option drawerGesturesEnabled, but this not doing anything.


Solution

  • You can set its sheetGesturesEnabled parameter to false

    BottomSheetScaffold(
        sheetGesturesEnabled = false,
        …
        …