React-native-snap-carousel: Swiping one item at a time (question)

Created on 29 Jun 2017  路  5Comments  路  Source: meliorence/react-native-snap-carousel

Hey, is there a way to enforce that the carousel only moves one item at a time, no matter how strong/fast the swipe is, without using a method/callback property? It already works relatively well (using the code of example 1, even better when activating momentum it seems), but it's also not too hard to swipe multiple items at a time.

Most helpful comment

adding decelerationRate={0} works for me though the scroll is a little slow on android

All 5 comments

Hi @codejet,

If you didn't read it already, you might find this useful.

I suggest you play with the prop scrollEndDragDebounceValueand set it to smaller values or even 0 (note that this prop only works when momentum is disabled). I also recommend that you take a look at ScrollView's decelerationRate (iOS only). Unfortunately, ScrollView on Android doesn't provide much fine-tuning :-(

Hope this helps anyway.

@codejet I am also looking for this feature. How you have supported this?

sorry @sridhard, i don't have access to the code anymore and after one year also don't remember the details/solution

adding decelerationRate={0} works for me though the scroll is a little slow on android

@codejet how to solve this in 2020 because in V3.2.0 property scrollEndDragDebounceValue is removed and enableMomentum will be removed in V4

Was this page helpful?
0 / 5 - 0 ratings