I have multiple screens with the same background. I thought of having the ImageBackground in the Navigation file itself. But somehow the screens are not visible.
Here is the code
<ImageBackground style={styles.imageContainer} source={pic1}>
<Stack.Navigator>
<Stack.Screen name="screen1" component="Screen1" />
<Stack.Navigator>
</ImageBackground>
imageContainer: {
flex: 1,
width: width,
height: height,
alignItems: 'center',
resizeMode: 'contain',
flexDirection: 'column',
},
Style also included
This is not working. Screen1 is not displayed but the background is properly displayed.
I also tried giving the cardStyle for the navigator as backgroundColor:"transparent", even tried backgroundColor:"transperent" but nothing is working.
Thank You!!