ursus
07/18/2024, 5:33 PMval connection = remember {
object : NestedScrollConnection {
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
return if (available.y > 0) {
Offset.Zero
} else {
Offset(x = 0f, y = -scrollState.dispatchRawDelta(-available.y))
}
}
}
}
return nestedScroll(connection)
Hi, I'm trying to do a "scrolling effect", such that a header is scrolled off screen but part of it is pinned to the top
This works fine, but feels weird, as it's lacking the overscroll stretch effect.
I presume the issue is returning Offset.Zero
rather than the overscroll settling, right?