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

221
Views
React Native: agrega una banda de color en el fondo

Me gustaría agregar una banda gris en medio de mi fondo blanco. Aquí está el problema: no puedo escribir nada dentro de él. Aquí está mi código: container: { flex: 1, justifyContent: "center", marginTop: 12, flexDirection: "column", }, upperContainer: { flex: 1, backgroundColor: "#fff", }, lowerContainer: { flex: 1, top: 1400, backgroundColor: "#F7F7F7", }

 <ScrollView style={{ flex: 1 }} contentContainerStyle={{ flexGrow: 1 }}> <View style={styles.container}> <View style={styles.upperContainer}> ... <View style={styles.lowerContainer}> ...
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No estoy seguro de lo que busca con ScrollView, pero aquí hay una forma de hacerlo en un fondo estático:

 <View style={{ flex: 1, backgroundColor: '#fff', justifyContent: 'center' }}> <View style={{ backgroundColor: '#bbb', width: '100%', paddingVertical: 12 }}> <Text style={{ textAlign: 'center' }}> Gray Stripe Text </Text> </View> </View >

Las claves son:

  • flex: 1 y allowContent: 'center' en la vista exterior
  • anidando elementos para que estén contenidos

Probablemente también podría hacer el fondo gris sin la Vista interna, agregando color de fondo directamente al Texto.

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!