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

117
Views
Reaccionar eliminar espacios al lado de la celda personalizada tableView

Tengo un scrollView que contiene un tableView que muestra una celda personalizada. Usé imageBackground para mostrar imágenes para el fondo de la celda personalizada. Sin embargo, cuando se muestra la celda, tiene dos espacios a los lados aunque configuré la vista para que se flexione al ancho de la celda.

ingrese la descripción de la imagen aquí

No parece ser un problema con imageBackground, ya que al eliminar imageBackground y establecer un color de fondo para View, también se muestran los espacios a un lado. ¿Cómo hago para que la vista cubra todo el espacio para que no haya espacios adicionales al costado de la celda?

ingrese la descripción de la imagen aquí

 const data = [ { title: "Joe's Gelato", imgUri: { uri:"https://images.unsplash.com/photo-1572307230741-453859592dce?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=735&q=800" } }, { title: "Joe's Diner", imgUri: { uri:"https://images.unsplash.com/photo-1540853986208-a3e8f4ab197a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80" } } ]; function HomeScreen({ navigation }) { const HomescreenCell = (props) => ( <Cell backgroundColor="black" {...props} onPress={() => navigation.navigate('Menu')} cellContentView={ <View style={{ flex: 1, height: 0.3 * dim.height }}> <ImageBackground style={{ flex: 1, height: 0.3 * dim.height }} source={props.imgUri} resizeMode="cover"> <Text style={{ fontWeight: "bold", fontSize: dim.height/30, fontFamily: "Trebuchet MS", color: "#FFC613", marginTop: dim.height/50, marginLeft: dim.height/50 }}> {props.title} </Text> </ImageBackground> </View> } /> ) return ( <ScrollView> { <View> <TableView> <Section header="HomeScreen" hideSeparator="true" separatorTintColor="#ccc" > {data.map((item, index) => <HomescreenCell key = {item.title} title= {item.title} imgUri= {item.imgUri} /> )} </Section> </TableView> </View> } </ScrollView> ); }
about 4 years ago · Juan Pablo Isaza
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!