I need to put a floating button appears in all screens, i put it in bottom tab navigator with absolute position but i couldn't set the onPress navigation for it.. how can i access navigation.navigate in tab navigator?
my code
MoreStack.navigationOptions = {
tabBarLabel: 'More',
tabBarIcon: ({ focused, navigation }) => (
<View>
<TabBarIcon
focused={focused}
name={Platform.OS === 'ios' ? 'ios-more' : 'md-more'}
type='ionicon'
/>
<View
style={{
flex: 1,
position: 'absolute',
bottom: 20,
alignItems: 'center',
right: 10,
}}
>
<TouchableOpacity onPress={() => navigation.navigate('Chat')}>
<Image
source={require('../assets/chat.png')}
style={{ alignSelf: 'center', height: 60, width: 60 }}
/>
</TouchableOpacity>
</View>
</View>
),
};