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

Alex Bieliaiev

06/10/2021, 9:58 AM
Hi guys, I have a question about
nestedScroll
thing. So I have a
ModalBottomSheetLayout
and a vertically scrollable column within that bottom sheet.
ModalBottomSheetLayout
participates in the nested scrolling (please see
PreUpPostDownNestedScrollConnection
). As far, as I understand the logic,
ModalBottomSheetLayout
consumes entire scroll delta through the
onPreScroll
, so the actual scroll target (the child column) doesn't receive any delta at all. This results into the bottom sheet being dragged vertically instead of the column being scrolled. Any suggestions?
a

Albert Chang

06/10/2021, 10:01 AM
When the bottom sheet is fully expanded, its children should start to scroll. What is your problem?
a

Alex Bieliaiev

06/10/2021, 10:03 AM
I think I described my problem in the initial message. What's unclear about it?
a

Albert Chang

06/10/2021, 10:04 AM
This results into the bottom sheet being dragged vertically instead of the column being scrolled.
If you mean before the bottom sheet is fully expanded, then this is the intended behavior.
a

Alex Bieliaiev

06/10/2021, 10:05 AM
No, the bottom sheet is fully expanded. Now I try to scroll the child column, but bottom sheet intercepts the scrolling.
a

Albert Chang

06/10/2021, 10:19 AM
Bottom sheet only consumes delta it can consume. See here.
If you post your code we can check.
a

Alex Bieliaiev

06/10/2021, 10:45 AM
Works fine in a standalone setup
Yes, probably I messed something up in my implementation
Yes, it's my fault in the end. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1614768328100000?thread_ts=1614530232.195400&cid=CJLTWPH7S resulted in the SwipeableState.processNewAnchors being cancelled, so the last three lines are not executed. Then the bounds of a bottom sheet are incorrect.
👍 1
23 Views