禁用scrollview滚动时,Listview不会在scrollview内滚动
我有以下结构禁用scrollview滚动时,Listview不会在scrollview内滚动,listview,react-native,scrollview,react-native-android,react-navigation,Listview,React Native,Scrollview,React Native Android,React Navigation,我有以下结构 <Scrollview> (scrollview scroll disabled and have refreshcontrol <Scrollview> (this is horizontal scrollview works fine) </Scrollview> <Tabnavigator> (this is react-navigation Tabnavigator)
<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>
(scrollview已禁用滚动并具有刷新控制
(这是水平滚动视图,工作正常)
(这是react导航选项卡Navigator)
-表1(反应组件具有列表视图)
-表2(反应组件具有列表视图)
我的实际渲染方法包含
<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>
{this.state.animating(
):(
下一跳
{nexttojumpdata}
)}
现在我希望选项卡中的Listview可以滚动。这是我在选项卡1和选项卡2中的Listview
<ListView
automaticallyAdjustContentInsets={false}
removeClippedSubviews={false}
dataSource={this.state.dataSource}
renderRow={(rowData) => {return
this.renderRow(rowData)}}
enableEmptySections={true}
/>
{return
this.renderRow(rowData)}
enableEmptySections={true}
/>
我现在得到的结果是listview内部选项卡没有滚动。当我在父scrollview上启用滚动时,整个布局将滚动。listview内部的导航也不工作
有什么帮助吗?你能给内部列表视图flex:1看看它是否有效吗?@FatemehMajd我尝试了flex:1到内部列表,但没有改变。