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}
                  />
                }
                />

 

posted on 2016-09-08 15:00  Simle  阅读(1705)  评论(0编辑  收藏  举报