alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.55k stars 462 forks source link

Animation freezing when swiping #172

Open chaboc opened 6 years ago

chaboc commented 6 years ago

When I'm swiping on real device animation is freezing: It's going to the middle of the animation and after it's fragmented, this only happens when I'm swiping. (When I programmatically swipe it doesn't freeze).

Thanks for the help !

themakerman commented 6 years ago

are you in development mode or production mode. Try production mode. Will be much smoother.

chaboc commented 6 years ago

I'm in development mode thanks for the help !

Bunkerbewohner commented 6 years ago

I have the same problem, but unfortunately also in production mode. React 0.56, Android 6.0. It looks like it always happens when passing the horizontal swipe threshold (I have vertical swiping disabled), both on the way "out" and when you swipe back without lifting the finger.

I figured maybe maybe overlay labels are the problem, but it happens even without overlay labels:

<Swiper cards={words} renderCard={this.renderItem} ref={ref => this.swiper = ref}
                       onSwipedLeft={this.onSwipeLeft} onSwipedRight={this.onSwipeRight}
                       stackSize={4} showSecondCard={true} cardVerticalMargin={60}
                       cardStyle={{height: this.state.cardHeight}}
                       overlayLabels={null} animateOverlayLabelsOpacity={false}
                       onSwipedAll={this.onSwipedAll} cardIndex={this.state.currentIndex}
                       verticalSwipe={false} disableTopSwipe={true} disableBottomSwipe={true}/>

I'm going to keep investigating and see if I can find the problem in my case... and in the meantime maybe I'm going to add buttons like they have in Tinder which will just programmatically trigger the swipe (which works fine).

P.S. it happens also with showSecondCard={false}, though to a lesser degree. Also after swiping "away" a card, there's a visible delay until the next card shows up.

Bunkerbewohner commented 6 years ago

Correction: when I move a card programmatically it will freeze near the end of the animation (so that you can see a bit of the corner of the card still) and not respond for 1 second or so. This doesn't happen when swiping "manually", but instead you have the freeze during the movement but shorter.

On iOS (as tested on an iPhone SE) I don't have any of these problems.

webraptor commented 5 years ago

Does it happen with the demo app in the example folder, or just integrated within custom apps?