Tengo un código simple en el que intento mostrar una pantalla negra semitransparente sobre mi página para mostrar un mensaje o un aviso en el centro, así que uso zIndex o elevación con posición: 'fijo' o posición: 'obsoleto' funciona bien en la web, pero cuando ejecuto la aplicación en Android, se bloquea y no se muestran errores.
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; export default function App() { return ( <View style={styles.container}> <View style={styles.dialog}/> <Text>Open up App.js to start working on your app!</Text> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', height:'100%', justifyContent: 'center', }, dialog:{ position:'fixed', zIndex:10, elevation:10, backgroundColor: 'rgba(0,0,0,.5)' } });"fijo" es un valor no válido para la posición, ¿puede intentarlo con absoluto de la siguiente manera:
dialog: { // position: "fixed", position: "absolute", top: 0, bottom: 0, right: 0, left: 0, zIndex: 10, elevation: 10, backgroundColor: "rgba(0,0,0,.5)", },