私のReactNativeアプリケーションでは、アイテムのグループに対して2列のレイアウトを実装しようとしています。ReactNative iOSアプリケーションの2つの列レイアウト
コード私が働いている:私は間違って何をやっている
<Content>
<Grid style={{flexWrap: 'wrap', flex: 1}}>
{this.state.stories.map(function(story, index){
if (index % 2 === 0) {
return <Col key={ index } style={{margin: 5, width: Dimensions.get('window').width/2.2}}>
<View>
<Image style={{ height: 250, borderRadius: 10}} source={{uri: story.picture_url}} />
</View>
</Col>
} else{
return <Col key={ index } style={{margin: 5, width: Dimensions.get('window').width/2.2}}>
<View style={{marginTop: 25}}>
<Image style={{height: 250, borderRadius: 10}} source={{uri: story.picture_url}} />
</View>
</Col>
}
}.bind(this))
}
</Grid>
</Content>
?
削除 'flexWrap: – LGSon
wrap'ません動作していないその。私はちょうど試みた。 – Karan
それから、あなたは何がうまくいかないか、それがどのように見えるか、そしてどのように見えるかを説明したいかもしれません – LGSon