react-native-animatable
react-native-animatable copied to clipboard
Restrict bouncing height
I'm using bouncing effect in my app. Im using an arrow to indicate an tab but the arrow is bouncing from top of the screen but my expectation is to bounce only for a shorter distance. I have attached my screen recording. My code is
<View style={{ position: 'absolute', top: Platform.OS == 'ios' ? '82%' : '80%', left: '13%', right: '76%' }}>
<Animatable.View animation="slideInDown" iterationCount='infinite' direction="alternate" >
<Ionicons
name='ios-arrow-round-down'
color='white'
size={80}
/>
</Animatable.View>
</View>
@jamesawer3 Is there any progress? Thanks.
Anybody able to restrict this ! Please help
you can make your custom animation like this
Animatable.initializeRegistryWithDefinitions({ slideInDown: { // Combined slideInDown & slideInLeft from: {translateY: -130, translateX: 0}, to: {translateY: 130, translateX: 0}, }, });
change X and Y axis as required