Tijs Gobbens
12/10/2021, 2:50 PMHorizontalPager
from the accompanist library with a content padding , but when swiping to the last item/page and do a "fast" swipe the previous items seems to disappear, this only seems to happen with a fast swipe move (maybe some overshoot swing animation?)
``````HorizontalPager(
count = 3,
modifier = Modifier.fillMaxSize(),
contentPadding = PaddingValues(horizontal = 16.dp),
itemSpacing = 8.dp,
) { page ->
val backgroundColor = when (page) {
0 -> Color.Blue
1 -> Color.Cyan
else -> Color.Green
}
Box(
modifier = Modifier
.fillMaxSize()
.background(backgroundColor)
) {
Text("page: $page", modifier = Modifier.align(Alignment.Center))
}
}
allan.conda
12/10/2021, 8:53 PMColton Idle
12/11/2021, 6:33 AMAndrey Kulikov
12/13/2021, 12:47 PM