Open thierryskoda opened 7 years ago
did you find any way you can get that transition ?
Yes but I didn't use react-native-swiper
to do it. I simply used the Animated
and Panresponser
libraries that are built-in react-native
.
I put the second view inside the home view but with position: 'absolute
and used transform: [{translateX}]
and opacity
to animate the whole thing.
@thierryskoda hey can you share a snippet of your code. specially the onPanResponderMove part, I am stuck on that which would be a huge help. Thanks in advance.
Hey @bispul. Here's my code:
onPanResponderMove: Animated.event([
null, {dx: this.state.pan.x, dy: this.state.pan.y},
]),
I took it from here: https://dev.to/hyra/getting-started-with-the-panresponder-in-react-native-9mf
Hi,
Is it possible to add some animation between transtions of "Views"? For example, in Snapchat, when you start swiping up to go to your profile, the new view start gradually losing some opacity while the new view opacity increase. It creates a nice fluid animation.
Thank you! Thierry