Hi! I have to use `BottomSheetDialogFragment` toge...
# compose
r
Hi! I have to use
BottomSheetDialogFragment
together with scrollable column, but I’m experiencing the same issue that is mentioned here. For that reason I’m implementing a workaround to detect vertical drag gestures for top handle of the bottom sheet, but at the moment only compose UI us moving as expected, but not the bottomsheet. Is there a way I can stick the bottomsheet to UI’s top so it’s also moving when surface height is changing? 😕
1
a
stick the bottomsheet to UI’s top so it’s also moving when surface height is changing
I don’t actually understand what you mean here, but if it’s really the same problem as the comment in the link, you can apply this to the top handle or to the whole bottom sheet content:
Copy code
Modifier.scrollable(
    state = remember { ScrollableState() },
    orientation = Orientation.Vertical
)
r
Oh, I mean fragment’s top, not UI’s top, sorry. So the issue is that if I don’t use nested scrolling then I’m not able to scroll the column inside the BottomSheetDialogFragment becuase the dialog is moving instead. If I use nested scrolling then I’m not able to expand / collapse the bottom sheet when I try to do that by dragging outside of the column. I think that Your suggestion wouldn’t fix that issue 😕
a
At least it’ll fix the problem in the case the comment in your link describes. If it doesn’t work for you, your problem is probably not the same as that.
r
Will give a try to this one. So should I set this modifier to the scaffold that contains the scrollable column?
Solution seems to be working. Thank You!
217 Views