I am in a situation within my project where it would be convenient to "prohibit the user from interacting with the app". I would like to do this, by rendering an invisible screen that is covering the entire display.
I notice that once the bottom tab is rendered, I cannot seem to force a view over it. Is there a way I can give my view priority over everything? I have tried zIndex but no luck, I just want my view to cover the entire screen.
I have an example demo here on snack expo where you can replicate my issue exactly. I have also included some code below that gives you the gist.
const Tab = createBottomTabNavigator();
export default function App() {
return (
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen name="ScreenA" component={ScreenA} />
<Tab.Screen name="ScreenB" component={ScreenB} />
</Tab.Navigator>
</NavigationContainer>
);
}
export default function ScreenA() {
return (
<View style={styles.container}>
<Text style={styles.paragraph}>
Screen A.
</Text>
<View style={{justifyContent: 'center', alignItems: 'center', backgroundColor: 'pink', height: 500}}>
<Text style={styles.paragraph}>Is it possible to make this view cover the entire screen? Including the bottom tab and top?</Text>
</View>
</View>
);
}