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

167
Views
Configuré la altura del modal para que sea más pequeña, pero ocupa la pantalla completa y no se muestra correctamente

Estoy escribiendo una aplicación de chat simple donde un usuario puede enviar una foto. Una vez que un usuario hace clic en un mensaje con una foto, se representa dentro de ImageViewer . Luego tengo la opción de guardar la foto. Una vez que se guarda la foto, quiero mostrar modal con "guardaste tu foto" o algo así. Hasta aquí todo bien. PERO, el modal con el mensaje informativo parece ocupar pantalla completa en lugar de un mensaje de una sola fila. Aquí está mi código:

 return ( <> <Modal animationType="slide" visible={showImageViewer && savedPhoto} onRequestClose={() => { setSavedPhoto(false); }} > <View style={styles.modalViewStyle}> <Text style={styles.modalTextStyle}> Please, dont take the whole screen </Text> </View> </Modal> </> );

Mis importaciones:

 import ImageViewer from "react-native-image-zoom-viewer"; import { GiftedChat } from "react-native-gifted-chat"; import { View, Text, Image, Modal, TouchableOpacity, StyleSheet, } from "react-native";

Mi estilo:

 const styles = StyleSheet.create({ image: { width: 150, height: 100, borderRadius: 13, margin: 3, resizeMode: "cover", }, modalViewStyle: { justifyContent: "center", alignItems: "center", flexDirection: "row", borderWidth: 3, borderColor: "red", height: 40, flex: 1 / 10, }, modalTextStyle: { fontWeight: "bold", color: "green", fontSize: 15, }, });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Haga que el fondo modal sea transparente y aplique estilo a la vista secundaria de esta manera

 <Modal transparent={true} visible={this.state.isVisible} onRequestClose={this.closeModal}> <View style={{ flex: 1, flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}}> <View style={{ width: 300, height: 300}}> // you modal content here </View>
about 4 years ago · Juan Pablo Isaza 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!