react-native-card-stack-swiper
react-native-card-stack-swiper copied to clipboard
can we have while_swipingLeft/while_swipingRight or onSwipe method with direction values
i want to get dy dx values or vx vy values when card is started to swipe
There are a CardStack events called onSwipe where you receive the current x, and y coordinates.
There are a CardStack events called onSwipe where you receive the current x, and y coordinates.
oh! my bad i did not check. thank you.
can you help me to do some animation?
like when card is started moving left increase opacity of a view and if card is swiped make opacity 0 and if card is still or moved back to initial state then also opacity should be 0
and one more
how to make this work?
const RenderCards=()=>{
const myLoop =[];
for(var i = 0; i < dataa.length; i++) {
console.log(dataa[i].cardName);
myLoop.push(
<Card style={[styles.card]}><Text onPress={()=>{clickedCard(dataa[i])}} style={styles.label}>{dataa[i].cardName}</Text></Card>
);
}
return myLoop;
}
and in render()
<CardStack
style={styles.content}
renderNoMoreCards={() => <Text style={{ fontWeight: '700', fontSize: 18, color: 'gray' }}>No more cards :(</Text>}
ref={swiper => {
this.swiper = swiper
}}
onSwiped={() => console.log('onSwiped')}
onSwipedLeft={() => console.log('onSwipedLeft')}
onSwipe={(x,y)=>console.log(x+"||||||||||||||"+y)}
>
{RenderCards()}
</CardStack>
please help