2017-06-17 91 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>。可能無法正常工作,但值得一試。對不起,我沒有評論權限。

相關問題