webraptor / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
134 stars 83 forks source link

Swipe & Tap on Card doesn't work on Android, but works on iOS #53

Open liyamahendra opened 3 years ago

liyamahendra commented 3 years ago

Hello,

Thank you for this library - works great on iOS and doesn't have the visual problems like react-native-snap-carousel library on Android.

However, the card doesn't respond to both Tap & Swipe on Android, but works fine on iOS. I did check out a similar issue and used the fix suggested, but it didn't help.

Following is my code:

<Swiper
                ref={swiper => {
                    swiperRef = swiper
                }}
                onSwipedLeft={() => onSwiped('left')}
                onSwipedRight={() => onSwiped('right')}
                onSwipedTop={() => onSwiped('top')}
                onSwipedBottom={() => onSwiped('bottom')}
                onTapCard={(cardIndex) => onTapCard(cardIndex)}
                cards={candidateExploreFullTimeData}
                cardIndex={cardIndex}
                cardVerticalMargin={64}
                renderCard={renderCandidate}
                onSwipedAll={onSwipedAllCards}
                stackSize={3}
                stackSeparation={20}
                pointerEvents={"auto"}
                containerStyle={{ height: 0, marginTop: 44, marginLeft: -22 }}
                useViewOverflow={Platform.OS === 'ios'}
                animateOverlayLabelsOpacity
                animateCardOpacity
                swipeBackCard
            />

I'm using below version of react & Expo:

"react": "16.13.1", "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz", "expo": "40.0.0",

@webraptor would you kindly assist with this one?

vij-ai commented 3 years ago

Not working for me too, any solutions ?

haveamission commented 3 years ago

I had this issue a couple years back, and recently ran into it again and had to look up my old solution.

The issue is that there isn't enough height.

https://github.com/alexbrillant/react-native-deck-swiper/issues/270