https://kotlinlang.org logo
#compose-android
Title
# compose-android
a

Atul Gupta

03/22/2024, 1:58 PM
Hi, While using the standard bottom sheet is there a way I can disable the nested scrolling when user scrolls the inside content list and allow the user to drag the sheet only from the drag handler?
Currently when user scrolls the list it first expands the bottom sheet and then scroll goes to the list. UseCase: Out bottom sheet content is more relevant when user can see and interact with background of the bottomsheet and get less useful when user expands the bottom sheet. Therefor we want to allow the user to keep scrolling the inside list even when bottom sheet is in half expanded state
s

Stylianos Gakis

03/22/2024, 2:03 PM
Unlikely to be able to configure this with the existing API. Look inside the source code of the sheet, you will be able to see how the nested scroll stuff is connected, to the content and to the handle itself. If you find that it's gonna be evident if you can customize that or not. If not you might have to copy the source code and alter it yourself to just not forward the scroll from inside the content to the sheet height itself.
a

Atul Gupta

03/22/2024, 2:05 PM
Currently I did kind of same with the
BottomSheetScaffoldAnchorChangeHandler
bottom sheet. But since there are lots of update around bottom sheet I thought this is also now possible. One thing that fixed with the current bottom is to allow the max width. But it seems that the I still have to copy the new bottom sheet for hacking the nested scrolling behaviour
👍 1
BTW this was possible with the view bottom sheet as there you can create a custom behaviour and pass the list of view ids on which you can disable the nested scrolling
2 Views