is there a way to change LazyListState scroll beha...
# compose
m
is there a way to change LazyListState scroll behavior to work as a pager? I have a LazyColumn of cards (2/3 cards per screen), and i want each drag gesture to just scroll one card
I’m not using a pager because the card height is dynamic
l
Is it not possible to make the pager height dynamic, too?
c
m
snapping is different i think. It works on fling. I want to scroll the scroll when past each item a a time
c
do you mean the internal content of the card should be scrollable? I feel like maybe i have a misunderstanding of what you're trying to do
m
Imagine a lazycolumn with 3 cards per screen height. When you do a quick scroll, the scroll stops at firstVisibleIndex +1 or -1 depending on direction
a
Are you looking for VerticalPager in accompanist?
m
Pagers have fixed height. Im not sure it would work but i can try
a
Pager itself works with page/item indexes so maybe that code can be reused? I wonder what happens if this line is removed. Might or might not work 😄