https://kotlinlang.org logo
#compose
Title
# compose
t

Tijs Gobbens

12/10/2021, 2:50 PM
i'm using the
HorizontalPager
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?) ``````
code:
Copy code
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))
    }
}
a

allan.conda

12/10/2021, 8:53 PM
Which accompanist version? You can file a bug if it's the latest
c

Colton Idle

12/11/2021, 6:33 AM
Yeah. I'd file a bug. Accompanist pager still has a lot of little papercuts like this.
a

Andrey Kulikov

12/13/2021, 12:47 PM
17 Views