I'm using com.google.accompanist:accompanist-pager
to implement infinite scroll of pages. I implemented everything as described in HorizontalPagerLoopingSample.
I need show my pager starting from third page. But when I set initialPage = 2 HorizontalPager showing wrong page.
In the sample to show the first page is set initalPage = Int.MAX_VALUE / 2
. Is it possible to calculate real specific position with infinite pager ?
I try to do something like this:
val positionFromIWantToStart = 2
val startIndex = (Int.MAX_VALUE / 2) + positionFromIWantToStart
val pagerState = rememberPagerState(initialPage = startIndex)
But this is not working correct, HorizontalPager
always show first page.
Please help me.