Box(
modifier = Modifier.size(100.dp),
contentAlignment = Alignment.Center
) {
val pagerState = rememberPagerState()
val items = listOf("A", "B", "C")
androidx.compose.foundation.pager.HorizontalPager(
state = pagerState,
pageCount = items.size,
modifier = Modifier,
verticalAlignment = Alignment.CenterVertically
) { page ->
Text(
text = items[page],
modifier = Modifier
)
}
}
In the above code, the pager stops scrolling after reaching the last item. However, I want the pager to continue scrolling endlessly after reaching the last item.