Open Luckygirlllll opened 4 years ago
I changed slideLeft function, animation looks much smoother now:
slideLeft = () => this.view.animate({
0: {
translateX: 100,
},
0.5: {
translateX: -0.3,
},
1: {
translateX: -0.5,
},
2: {
translateX: -1,
}
})
0
I need to make switch slide animation, and I almost did it, the slide animation to the right looks really good, but the slide animation to the left doesn't work smooth, any ideas how is possible to fix it?
Here is my code:
import * as Animatable from 'react-native-animatable';
changeLogin = () => { if (!this.state.loginEmail){ this.slideRight() } else { this.slideLeft() } this.setState({ loginEmail: !this.state.loginEmail }) }
handleViewRef = ref => this.view = ref;
Here is how it looks right now: