question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swiping one item at a time on v4

See original GitHub issue

Is this a bug report, a feature request, or a question?

(Write your answer here.)

Have you followed the required steps before opening a bug report?

(Check the step you’ve followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn’t a React Native bug?

(Write your answer here.)

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

(Write your answer here and specify the iOS/Android versions on which you’ve been able to reproduce the issue.)

Is the bug reproductible in a production environment (not a debug one)?

As currently, I have a problem with V4, when I swipe left many cards move to left.

Expected Behavior

How to solve this in 2020 because in V4.xxx beta property scrollEndDragDebounceValue is removed and enableMomentum will be removed in V4

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

10reactions
alejovdevcommented, Nov 12, 2020

I have this configuration and its working fine on android. react-native-snap-carousel version 4.0.0-beta.6

<Carousel
	onScrollIndexChanged={(index) => setActiveIndex(index)}
	ref={carousel}
	data={feedData}
	sliderWidth={Dimensions.get('window').width}
	itemWidth={Dimensions.get('window').width}
	renderItem={renderItem}
	layout={'default'}
	inactiveSlideOpacity={1}
	inactiveSlideScale={1}
	enableSnap={true}
	disableIntervalMomentum={true}
	shouldOptimizeUpdates
	removeClippedSubviews={true}
/>
7reactions
stanislavpoleshukcommented, Jul 23, 2021

for iOS is limited only to 3 sets of slides

Try to set the property:

useScrollView={true}
useExperimentalSnap={true}

Works on Android and IOS. My code:

<Carousel
	ref={ref}
	containerCustomStyle={{ width }}
	data={data}
	useScrollView={true}
	renderItem={renderItem}
	sliderWidth={width}
	itemWidth={width}
        scrollInterpolator={scrollInterpolator}
        slideInterpolatedStyle={animatedStyles}
        onSnapToItem={handleBeforeSnapToItem}
        vertical={false}
        useExperimentalSnap={true}
        activeSlideAlignment={'center'}
        layout={'default'}
        inactiveSlideOpacity={1}
        inactiveSlideScale={1}
        enableSnap={true}
        shouldOptimizeUpdates
        // @ts-ignore
        disableIntervalMomentum={true}
        removeClippedSubviews={true}
      />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Swiping one item at a time on v4 · Issue #765
I'm having the same problem, but it's only on android. Everytime i swipe my finger i end up sliding past all the cards...
Read more >
Swipe one item at a time Recyclerview - android
I tried adding on Scroll listener for recycler view and made some logic but i am not able to swipe one item at...
Read more >
Understanding swipe and drag gestures in RecyclerView
Here we make use of the onMove() method and leave the onSwiped() empty. As we drag the item over other items, we swap...
Read more >
Navigate your device with TalkBack - Android Accessibility ...
Explore by swiping. To explore your screen one item at a time, swipe up or down with one finger. When you focus on...
Read more >
Use AssistiveTouch on your Apple Watch
AssistiveTouch is compatible with Apple Watch Series 4 and later, ... Move back one item: Double pinch (Tap your pointer finger to your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found