Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
La aplicación de Android falla cuando uso las propiedades de estilo position o zIndex en react-native

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)' } });
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

"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)", },
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!