我有以下结构,
<Scrollview> (scrollview scroll disabled and have refreshcontrol
<Scrollview> (this is horizontal scrollview works fine)
</Scrollview>
<Tabnavigator> (this is react-navigation Tabnavigator)
-Tab1 (React component have listview)
-Tab2 (React component have listview)
</Tabnavigator>
</Scrollview>
我的实际渲染方法包含
<View style={styles.container} >
{this.state.animating?(
<Loader animating={this.state.animating}/>
):(
<ScrollView
scrollEnabled={true}
removeClippedSubviews={false}
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this._onRefresh}
tintColor="#57C0B8"
title="Loading..."
titleColor="#FDC28E"
colors={['#57C0B8']}
progressBackgroundColor="#ffffff" /> }
>
<View style={styles.itemBlock, styles.itemDateBackground}>
<View style={styles.itemDateBackground}>
<Text style={styles.itemDateHeadline}>
Next To Jump
</Text>
</View>
</View>
<ScrollView style={styles.wrapper}
horizontal={true}
showsHorizontalScrollIndicator={false}
automaticallyAdjustContentInsets={false}
>
{nexttojumpdata}
</ScrollView>
<RaceTabs />
</ScrollView>
)}
</View>
现在我希望Listview里面的标签可以滚动。这是我在tab1和tab2中的listview。
<ListView
automaticallyAdjustContentInsets={false}
removeClippedSubviews={false}
dataSource={this.state.dataSource}
renderRow={(rowData) => {return
this.renderRow(rowData)}}
enableEmptySections={true}
/>
现在得到的结果是tabview里面的标签不滚动。当我在父滚动视图上启用滚动时,整个布局将滚动。此外,listview中的导航无法正常工作。
任何帮助?