Jetpack Compose: LazyRow Scroll Percentage?
I am trying to implement a scroll indicator on LazyRow. Ideally it would transition smoothly while scrolling, but I read that it is not possible because we only have access to the firstVisibleItemIndex
from state. But even then, I have not been able to implement it the way I want because my items only take 90% of the width of the screen, therefore a little bit of the item before is shown. When the second item is selected, the first one is still visible on the screen, so firstVisibleItemIndex
never really changes until you scroll a bit past it.
FlingBehavior ignored on screen rotation / missing snapping after screen rotation
I have a LazyColumn
with a SnapFlingBehavior
. Everything works as expected when scrolling. However, on initial screen display as well as on screen rotation, the snapping is missing. How can I fix that, so I always have “snapped items”?