Is there a way to make LazyColumn/LazyRow snap items after fling/scroll ended? If there was this would be a working view pager out of the box :)
a
Adam Powell
08/30/2020, 12:43 AM
not yet, but we're in active discussions about the api shape patterns for layering this sort of thing on externally
elements that will likely be a part of the solution: a hoisted state object for the lazy layout that has some sort of suspend method on it that takes control of position changes over time. This API surface will serve both gesture control and programmatic scroll use cases
t
Timo Drick
08/30/2020, 12:58 AM
Maybe in the mean time you could use the Pager implementation of the Jetcaster sample app. Maybe it fits your needs
➕ 1
a
Adam Powell
08/30/2020, 1:06 AM
yeah, the constrained nature of viewpager is such that you don't need subcomposition for it, a regular custom layout with gesture control and state hoisting does the job just fine