I have an app with react-navigation where I want to draw over navigation bar. My app.js looks like this:
export default class App extends React.Component {
render() {
return (
<Provider store={store}>
<StatusBar barStyle='dark-content'></StatusBar>
<Navigation />
</Provider>
)
}
}
...
const AppNavigator = createStackNavigator({
Home: HomeView,
Detail: DetailView
},
let Navigation = createAppContainer(AppNavigator)
In HomeView which is the root component, my render method looks like this:
render() {
return (
<View style={{ flex: 1, backgroundColor: colors.backgroundColor }}>
{isModalVisible && <View style={styles.overlay}>
... Modal content
</View>}
... Other views
</View>
)
}
overlay: {
position: 'absolute',
zIndex: 1,
top: 0,
left: 0,
width: Dimensions.get('screen').width,
bottom: 0,
backgroundColor: '#000000A0',
},
My problem is that, the modal view doesn't render over navigation bar, ie the bar is not under the overlay. I cannot use builtin modal or react-native-modal, is there any way with regular views to render over navigation bar?