0

I am new in compose and I'm trying to implement own ViewPager. I was create HorizontalPager and PagerState. Inside Pager I create LazyRow, and everything looks good but I have some problem. I want to make it scroll only one item at a time. but it doesn't work like that. As far as I understand it is responsible flingBehavior.

But unfortunately I don't quite understand how it works. I found an example in the library com.google.accompanist:accompanist-pager, but it is very difficult for me to understand, in addition, an additional library is used there (chrisbanes.github.io/snapper), is it possible to implement this in a simpler way?

Please, help me how to implement page by page scroll.

UPD: In this page https://fvilarino.medium.com/creating-a-viewpager-in-jetpack-compose-332d6a9181a5 I was found a simpler example, but scrolling on one page also does not work here, tell me please in which direction I need to move in order to perform a page by page scroll within this

testivanivan
  • 967
  • 13
  • 36

0 Answers0