Hi, LazyColumn in alpha4 works great, should we use LazyColumn or LazyColumnFor and what is the difference ? Another question, how to control scroll offset index using LazyColumn/LazyColumnFor, thanks
z
Zach Klippenstein (he/him) [MOD]
10/01/2020, 10:16 PM
LazyColumnFor is just shorthand for a LazyColumn with a single list of items, I believe. Use whichever one does what you need and makes your code more readable. Although I think the API for LazyColumnFor is slightly more stable than LazyColumn right now.
Zach Klippenstein (he/him) [MOD]
10/01/2020, 10:18 PM
You can control the scroll position by remembering your own LazyListState and passing it to the lazy composables.
b
Bsn Net
10/01/2020, 10:20 PM
Thanks for answering, the remember state i already got it but it seems that i cant make it scroll to index programmatically do you know how to do this?