How to disable pager animation of HorizontalPager

Advertisements I create a page which has 4 tabs and subpages, the HorizontalPager with dragEnabled = false, then I want to disable the animation when I click the tabs for changing the pages. How can I do it? Column(modifier = Modifier.padding(bottom = 0.dp)) { HorizontalPager( state = pagerState, flingBehavior = PagerDefaults.rememberPagerFlingConfig(pagerState), verticalAlignment = Alignment.CenterVertically, horizontalAlignment… Read More How to disable pager animation of HorizontalPager

Why does HorizontalPager's automatic scrolling stop after manual scrolling?

Advertisements I have a HorizontalPager val pageCount = bannerList.size val startIndex = Int.MAX_VALUE / 2 val pagerState = rememberPagerState(initialPage = 100) HorizontalPager( count = Int.MAX_VALUE, state = pagerState, contentPadding = PaddingValues( horizontal = 20.dp ), modifier = Modifier .fillMaxWidth() ) { index -> // content goes here } and I made it scrolling every 4… Read More Why does HorizontalPager's automatic scrolling stop after manual scrolling?