Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
575 views
in Technique[技术] by (71.8m points)

how to reduce the spacing between the items in react-native-super-grid package grid

I am working in react native and I am using package. My question is how can I remove the space between the items. I am sharing images so you can understand what I want.

I want this type of grid with minimum margin

This is what I want

This is what I get there is a lot of space between them I tried to reduce the space between items by downloading the package but I did not understand the code the code is difficult for me.

enter image description here

<FlatGrid
  itemDimension={120}
  spacing={0}
  data={[1,2,3,4,5,6,7,8,9,10,11,12,13,14]}
  renderItem={({item}) => (
   <Card key={item}/>
  )}
 />

**// card component**
<Card containerStyle={{padding: 0}}>
  <View style={{ justifyContent: 'center',alignItems: 'center'}}>
   <Image
    source={require('../assets/scroll_image.png')}
    style={{height:height/9,width:"100%"}}
   />    
  <Text style={styles.cardText }>TEAM LEADERSHIP</Text>
  </View>
</Card>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...