【发布时间】:2017-04-28 09:41:56
【问题描述】:
在我们的 React-native 项目中,我们有一个屏幕,它有一个父 Scrollview(具有拉动刷新),并且在滚动视图中我们有 Listview(作为冷视图)。
在 iOS 中,我们可以滚动滚动视图(父视图)和列表视图(子视图)。
但在 android 中,我们无法滚动 Child Listview。当我们尝试滚动子 Listview 时,父视图正在滚动。子视图没有得到触摸。
这与 React-native 问题有关吗?谁能告诉我如何解决这个问题?
代码sn-p:
<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>
【问题讨论】:
-
请给我看看你当前的代码
-
你尝试过什么...?
-
先更新你的代码...
-
@Prashantpattar,我添加了代码 sn-p。请检查。
-
我认为你的列表视图很小。尝试在 ListView 的样式属性上设置 flex: 1 或 height: 587。
标签: android react-native react-native-android