https://kotlinlang.org logo
g

Grzegorz Baczek

10/30/2020, 1:47 PM
Hey, I'm currently playing a little with LazyRowFor and I was wondering if there is any possibility to scroll the list programatically, not with the finger swipe. I actually can't find any clear answer for that so I decided to ask it here.
c

cb

10/30/2020, 4:06 PM
Currently there's no way to scroll a
Lazy*
a

Andrey Kulikov

10/30/2020, 5:52 PM
but we are working on it right now
👍 1
g

Grzegorz Baczek

10/30/2020, 6:06 PM
Thanks for the info
h

Hitanshu Dhawan

10/30/2020, 6:23 PM
@Andrey Kulikov is there anything similar to RecyclerView.OnScrollListener available now?
a

Andrey Kulikov

10/30/2020, 6:25 PM
properties
firstVisibleItemIndex
and
firstVisibleItemScrollOffset
in
LazyListState
are backed by
State
, so they are observable and if you use them inside composable or measure or draw block it will be automatically reexecuted when the scroll changes
h

Hitanshu Dhawan

10/30/2020, 6:29 PM
Got it, LazyListState is what I’m looking for. Thanks.
3 Views