问题描述
如何将我的 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 的道具。有人可以帮我吗?
库:https://github.com/Flipkart/recyclerlistview
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)