react native listview 一个有用的属性,用作两列布局

contentContainerStyle:设置listview包裹内容的属性
<ListView
                    contentContainerStyle={{flexDirection:'row',flexWrap:'wrap'}}
                    style={{flex: 1}}
                    initialListSize={1}
                    dataSource={dataSource}
                    renderRow={this.renderProduct}
                    onEndReached={this.onEndReached.bind(this,dataState)}
                    onEndReachedThreshold={10}
                    renderFooter={this.renderFooter.bind(this,dataState)}
                    refreshControl={
                  <RefreshControl
                    refreshing={dataState.isRefreshing}
                    onRefresh={this.onRefresh.bind(this)}
                    title="加载中..."
                    colors={COLOR_REFRESH_CONTROL}
                  />
                }
                />
原文地址:https://www.cnblogs.com/luoxiaolei/p/5853088.html