https://kotlinlang.org logo
#compose
Title
# compose
b

Bino

03/03/2022, 12:35 PM
Is there any “fastscroll” library for LazyLists and/or LazyGrid out there? Haven’t found anything. Or Can me someone point how it could be implemented?
a

Alexander Maryanovsky

03/03/2022, 2:15 PM
What do you mean by “fastscroll”?
b

Bino

03/03/2022, 2:20 PM
a

Alexander Maryanovsky

03/03/2022, 2:24 PM
I see. Not that I know of, but shouldn’t be very difficult to implement.
You
remember
the lists’s
LazyListState
and use it to scroll to the appropriate item.
It’s basically a fancy scrollbar
b

Bino

03/03/2022, 2:27 PM
the ListState isn’t the issue. It more like where do I get the values / headers from. should I group the items myself or does the dev need to put in a map so I can generate the scroll items?
a

Alexander Maryanovsky

03/03/2022, 2:29 PM
That’s an API design decision… You could have the developer provide the mapping from letters to indices, or write a function that takes a list of strings and creates such a mapping, or both.
6 Views