Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

246
Vistas
Center React Native Paper Modal

I might be missing something small here but I can't seem to get my <Modal> component to center in my React Native app. Here is the code for the modal:

...
            <Portal>
                <Modal
                    visible={modalVisible}
                    onDismiss={hideModal}
                    contentContainerStyle={{
                        backgroundColor:'white',
                        padding:20,
                        width:'90%'
                    }}
                >
                    <ScrollView>
                        <Text>A long chunk of text</Text>
                        <Button
                            onPress={hideModal}
                            color='#5F9DA5'
                            mode='contained'
                            dark={true}
                        >
                            Cool!
                        </Button>
                    </ScrollView>
                </Modal>
            </Portal>
...

I tried doing this as well:

                <Modal
                    visible={modalVisible}
                    onDismiss={hideModal}
                    contentContainerStyle={{
                        backgroundColor:'white',
                        padding:20,
                        width:'90%',
                        flex: 1,
                        alignItems: 'center',
                        justifyContent: 'center'
                    }}
                >

Unsure what I'm missing here.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try adding alignSelf:"center" to contentContainerStyle

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda