Hey. Not sure if this is bug or it is working as i...
# compose
g
Hey. Not sure if this is bug or it is working as intended so I decided to post it here. So my case is that I'm using
LazyRowFor
with elements whose width is equal to window width. And I'm trying to get currently visible item on the screen by using
rememberLazyListState()
with
firstVisibleItemIndex
. The problem is that whenever I reach the end of the list, this index is not updated. So the second to last item is fully hidden and only the last one is visible, but it still indicates second to last item. I've worked around it by adding 1 dp to the items width but it doesn't seem right. Also I've got question: is it possible in this case to make items adjust their position after each fling to the start of the screen? For example 3rd item is visible on the screen, I swipe from right to left and then 4th item enters from right side and gets snapped to the start of the screen, so it fill whole screen width.
a
about the first one: could you please file a bug? about the second one - you are asking for snapping, we have it planned, but will probably not yet have it the nearest future
g
Thanks for the answer, I will file a bug in spare time.