【发布时间】:2019-02-20 03:23:21
【问题描述】:
当我将horizontal = {true}设置为FlatList时,flex:1在renderItem上不起作用,这个问题的解决方案是什么?
<FlatList
horizontal={true}
data={this.state.users}
renderItem={({item}) =>
<View style={{flex:1,backgroundColor:'blue'}}><Text>hello</Text></View>
}
keyExtractor={item => item.email}
/>
【问题讨论】:
-
您希望在 Flatlist 中呈现的项目的最终结果是什么?
-
@PritishVaidya 我要使用整个屏幕
标签: reactjs react-native