react-native-animatable icon indicating copy to clipboard operation
react-native-animatable copied to clipboard

Restrict bouncing height

Open jamesawer3 opened this issue 5 years ago • 3 comments

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>

Screen Recording 2020-05-27 at 12.39.49 PM.zip

jamesawer3 avatar May 27 '20 07:05 jamesawer3

@jamesawer3 Is there any progress? Thanks.

hongweiCui avatar Mar 10 '21 11:03 hongweiCui

Anybody able to restrict this ! Please help

ahmad6242 avatar Aug 02 '21 06:08 ahmad6242

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

maazalam45 avatar Dec 15 '21 07:12 maazalam45