2017-06-17 96 views
1

我有一个列表视图与固定的高度与1000条记录,ListView获取绑定,但它没有滚动我已经尝试使用Flex中的父视图内的ListView:1也设置高度父视图,用flex:1设置listview的高度,但没有一个正在工作。请帮忙。反应原生固定高度的ListView没有滚动

试图与

<ListView 
    style={{ backgroundColor: 'red', height: 300 }} 
    enableEmptySections={true} 
    showsVerticalScrollIndicator={true} 
    dataSource={this.state.dataSource} 
    renderRow={this.renderListView.bind(this) } 
/> 

// after parent view 


<View style={{ flex: 1 }}> 
    <ListView 
     style={{ backgroundColor: 'red', height: 300 }} 
     enableEmptySections={true} 
     showsVerticalScrollIndicator={true} 
     dataSource={this.state.dataSource} 
     renderRow={this.renderListView.bind(this) } 
    /> 
</View> 

但他们没有worked..please帮助

回答

0

我猜在这里,但也许尝试使用<FlatList>或尝试在<ScrollView>包裹<Listview>。可能无法正常工作,但值得一试。对不起,我没有评论权限。

相关问题