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

206
Vistas
How to align card-images next to each other in react native

I just started with react native, I wanted to align card images next to each other (react-native-elements) but it does not work for some reason. What I want to achieve is two rows in on phones and 3 rows on tablets. But for some reason my code does not work. First the cards are aligned connected to each other no space between them and on my phone (Iphone 12) it is aligned as a column. Even though I have set flex-direction to row. could someone look at my code and tell me what is wrong?

card-image element

<View style={styles.secondPartOfDisplay}>
        {categories.map((c,i) => {
          return (
                <View key={i} style={{width: 200, height: 150, flexDirection: 'row'}}>
                  <Card.Image >
                <Image
                    style={{width:200,height:150}}
                    resizeMode="cover"
                    source={c.imageSource}
              />
                  </Card.Image>

                </View>
          )
        })}

      </View>

styles:

secondPartOfDisplay: {
    paddingTop: 30,
    display:'flex',
    flexDirection: 'row',
    flexWrap: 'wrap',
    justifyContent: "space-between"
  },

And here is the image on how it looks on phone:

Iphone 12 look

This is how it looks on ipad:

this is how it looks on ipad

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

0

If there iis no extra margin or padding that's messing with your container grid, then probably your images are not responsive according to the screen size. You would probably need to set your image height: "100%" and width: "auto" Hope this resolves your issue.

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