0

I want to detect scroll position of my LazyRow.

For example I scroll 2000px in a LazyRow and then navigate to another screen and come back. when I come back, LazyRow is scrolled 2000px and state is saved correctly. However I need that initial 2000px scroll position. how can I achieve that?

rememberLazyListState().firstVisibleItemScrollOffset

As shown above, LazyListSate only gives firstVisibleItemScrollOffset and not the whole scrolling position.

Update: I want this scroll position to react based on it. As in the image below, I have a LazyRow and an Image together. an example usecase is when user scrolls the list, I want to change image's alpha.

enter image description here

mrzbn
  • 497
  • 1
  • 3
  • 15

0 Answers0