Status Update
Comments
ma...@google.com <ma...@google.com>
le...@google.com <le...@google.com> #2
Hi, thanks for reporting this. For now this is expected as nested scrolling is only activated through gesture based scrolling, not animation based scrolling. We do have plans to explore animation based nested scrolling in the future, so I'll keep you posted if things change. Closing this ticket for now as this is WAI.
sk...@gmail.com <sk...@gmail.com> #3
Is there a ticket to follow?
eg...@gmail.com <eg...@gmail.com> #4
cj...@gmail.com <cj...@gmail.com> #5
Can we add a ticket for animation based nested scrolling? So it can at least be tracked publicly.
Its not possible to workaround this when the nestedScroll(connection, null)
modifier is hidden deep in 3rd party code.
Also it sort of weird too as one needs to manually call all nested scroll methods (pre & post scroll) & actual component scrolling methods, effectively reimplementing ScrollingLogic
, somewhat.
le...@gmail.com <le...@gmail.com> #6
I second this, or at least the trackable issue for animation based nested scrolling
ji...@gmail.com <ji...@gmail.com> #7
nestedScrollConnection.onPreScroll(
Offset(0f, with(localDensity) {
val scrollDistance = -(scroll.value)
println("scroll distance: $scrollDistance")
scrollDistance.toPx()
}
),
NestedScrollSource.UserInput
)
It scrolls partially on the first time, and it scrolls completely on second time, so I had to call it twice.
Description
Jetpack Compose version: 1.3.0-alpha01
Jetpack Compose component(s) used: LazyColumn and NestedScrollConnection
Android Studio Build: Android Studio Chipmunk 2021.2.1 Patch 1
Kotlin version: 1.7.0
Hi,
NestedScrollConnection::onPreScroll
is not called when manually scrolling to a specific position viascrollToItem
oranimateScrollToItem
. It would be very convenient ifNestedScrollConnection::onPreScroll
was calledCode Sample to Reproduce: