在我们的React-native项目中,我们有一个屏幕,它有一个父Scrollview(带有pull to refresh),在scrollview中我们有Listview(作为chilld视图).
在iOS中,我们可以滚动Scrollview(父级)以及Listview(子视图).
但在android中,我们无法滚动Child Listview.当我们尝试滚动子Listview时,父视图将滚动.儿童视图没有获得触摸.
这与React-native问题有关吗?谁能告诉我如何解决这个问题?
代码段:
<ScrollView contentContainerStyle={styles.contentContainerStyle} refreshControl={this.getRefreshControl()}>
<View> Some header </View>
<MyComponent> </MyComponent>
<ListView /* This list view is not scrolling in Android */
dataSource={dataSource}
initialListSize={10}
renderRow={this.renderRow}
renderSeparator={this.renderSeparator}/>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)