I couldn't manage to display the View below on android devices. Is this related to react-navigation? This is working on IOS just fine.
// App.tsx
export default function App() {
const navigationRef = useNavigationContainerRef();
const [pageState, setPageState] = React.useState<NavigationState>();
const handleGetInitialState = () => {
setPageState(navigationRef.current?.getRootState());
};
return (
<NavigationContainer
ref={navigationRef}
onReady={handleGetInitialState}
onStateChange={(state) => setPageState(state)}
>
<View
style={{
position: 'absolute',
height: 200,
width: 200,
top: 0,
right: 0,
backgroundColor: 'red',
zIndex: 99999,
}}
/>
<RootNavigation />
</NavigationContainer>
);
}