React Native中的renderScrollComponent上的ListView网格

时间:2016-04-26 10:10:53

标签: listview grid react-native

我的问题与this SO question基本相同。我将网格视图设置为一个简单的ListView(就像在链接的问题中一样),但在使用renderScrollComponent时我无法使其工作。

我的代码如下所示:

<ListView
  ref="ListView"
  contentContainerStyle={styles.list}
  dataSource={ this.state.dataSource }
  renderRow={this.renderCategories}
  renderScrollComponent={props => (
<ParallaxScrollView
    *start of parallax component*

样式表:

list: {
  flexDirection: 'row',
  flexWrap: 'wrap'
},
item: {
  flexDirection: 'row',
  margin: 3,
  width: 120
},

当我评论renderScrollComponent时,网格工作正常。所以我的问题是如何在renderScrollComponent内部进行网格工作?我是否必须在某处应用特定风格?

(注意我在renderScrollComponent使用this repo进行视差观看。

0 个答案:

没有答案