I'm facing a problem with Android 12 overscroll co...
# compose
s
I'm facing a problem with Android 12 overscroll configuration and nested scroll. I'm using
nestedScroll
to detect whether a child
ScrollState
reaches the top, so I can forward the deltas to the parent's
DraggableState
(see video). However, the android 12 stretch overscroll effect seems to use the available deltas (which is expected to perform the animation), but it also consumes them, and it causes my
nestedScroll
onPreScroll
available
parameter to be very close to zero. How can I tell the overscroll effect to not the deltas? (the first clip is how it looks like without the overscroll effect)
I think the problem would be solved if only the
overscrollEffect
was exposed as a parameter in both
scroll
Modifier and
LazyList
(like
flingBehavior
)
a
It’s hard to tell without the code but I don’t think this has anything to do with overscroll effect.
ModalBottomSheetLayout
has similar effect and it works well on Android 12+.
Your
NestedScrollConnection
should be the same as this.
s
Thanks, I'm gonna check it out
Yep, it works - my
onPostScroll
was faulty 🙂
I didn't thank you yet - I was pretty sure it was a overscroll effect problem - it would have taken ages to figure out!