如何将我的 recycerlistview 项目居中?
如果我想使用样式,那么我会收到以下错误消息:
Invariant Violation: ScrollView child layout (["alignItems","justifyContent"]) must be applied through the contentContainerStyle prop
<View style={styles.container}>
<RecyclerListView
style={styles.recyclerlistview}
rowRenderer={rowRenderer}
dataProvider={dataprovider}
layoutProvider={layoutprovider}
scrollViewProps={{showsVerticalScrollIndicator: false}}
externalScrollView={ScrollViewWithHeader}
/>
</View>
styles...
recyclerlistview: {
flex: 1,
width: width * 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#fff'
},
但是 recyclerlistview 没有名为 contentcontainerstyle 的道具。谁能帮我?