epoxy
epoxy copied to clipboard
[Carousel] Wrong snapping center at the start/end of list
trafficstars
When I set numViewsToShowOnScreen on an even number with a point (ex: 4.3, 6.1, 6.8), Carousels sniping on the centered item at the start and end of the list. but with odd numbers (with point) is working well.
As you can see the initial position is ok, but when I scroll it a little bit, it won't stick to start again.

I tried 4.3.1 and 4.5.0. both of them has this issue
I am still having this exact same issue
Fixed with this:
@ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT)
internal class YourCarousel(context: Context) : Carousel(context) {
override fun getSnapHelperFactory(): SnapHelperFactory? {
return null
}
}
https://github.com/airbnb/epoxy/issues/1022#issuecomment-785119686