Invoke animation each time i open the screen of my react native application - react-native

I'm using react native animatable to add animation to my app screens.
I've added bottom tab navigation and i want to make animation each time i click the tab icon to open the screen.
My problem is that the animation is launched only one time
<View style={styles.container}>
<Animatable.View animation="fadeInUpBig" duraton="1500">
<Text> Accueil </Text>
</Animatable.View>
</View>

Related

How to use nested Touchables with react native gesture handler

I'm trying to change all my Touchables to react native gesture handler, but when I have some nested Touchables it just doesn't work the same way, this an example:
<TouchableOpacity
onPress={() => setMenuVisible(false)}
<View style={styles.rightContentTop}>
<TouchableOpacity onPress={handleUsernameTap}>
<Text style={styles.name}>{username}</Text>
</TouchableOpacity>
</View>
</TouchableOpacity>
When I use the Touchables from react native there is no problem, but when I change them to the ones from react native gesture handler both are getting call when I click on the nested one, what am I missing?
Edit:
The problem seems to be happening only in Android.

React Native Modal + translucent not working on android

I want make full screen modal with translucent StatusBar
So, I made Modal with StatusBar.
it work well on ios simulator. but It is just below StatusBar on android, Not full screen
This is my code
<Modal>
<View>
<StatusBar
barStyle="dark-content"
translucent
backgroundColor="transparent"/>
<SomeComponent
...
/>
</View>
</Modal>
How can I fix this?

How to define a click area on a button with react native?

I'm currently developing an app using react native and I'm using react-navigation to navigate between screens, using buttons in my header (back arrow for example).
It's working well, however even if my icon is the right size it seems like the click area is really narrow and I struggle with it.
Do you know how I could define a click zone on my button for it to be clicked easier? I've tried the hitslop prop but it's not working for me (maybe it's been deprecated?).
Here is my button:
var backArrow =
<TouchableOpacity onPress={() => this.props.navigation.goBack()}>
<Ionicons name="ios-arrow-back" size={22} color="#ff8c00" />
</TouchableOpacity>
I'm using Expo and testing on an iPhone 6s Plus.
Wrapping the Ionicons in a TouchableOpacity will only provide a clickable area as large as the Ionicons component. You can increase the size of the clickable area with the following structure:
<TouchableOpacity>
<View>
<Ionicons />
</View>
</TouchableOpacity>
by styling the View to be as large as you require it.

React native refreshControl with custom spinner android

We need to implement pull to refresh functionality on scrollview in react native app with custom spinner. We have achieved this in iOS by using react native customControl. On iOS, ScrollView is scrolling and we are able to see the spinner on top, when we pull scroll view.
But the same code for android does not work. Because, In android the ScrollView is not scrolling when i pull the scrollview (May be the content is less than the screen height). The spinner will be visible only when we scroll the view. In this case, how to implement/achieve this functionality in android?
<View style={styles.containerStyle}>
<View style={styles.spinner}>
<Spinner />
</View>
<ScrollView
style={styles.scrollview}
contentContainerStyle={styles.contentContainer}
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this._onRefresh}
tintColor='transparent'
colors={[ 'transparent' ]}
style={backgroundColor : 'transparent'}
/>
} >
</ScrollView>
</View>

React-Native : is there a way to control the ripple duration in TouchableNativeFeedback?

I used TouchableNativeFeedback for a View in my code .Onpressing that View i m navigating to the other page.But On press the ripple effect takes a second or more sometimes to complete and navigate to the next page.I am calling a function on press of the View as shown below.
<TouchableNativeFeedback
underlayColor='#A3A7AC'
onPress={this.props.mainNavAction.bind(null,categoryitems[index])}
background={TouchableNativeFeedback.Ripple('#A3A7AC',false)}>
<View >
............
</View>
</TouchableNativeFeedback>