React Native Nested ScrollView无法在Android设备上滚动 [英] React Native Nested ScrollView Can`t Scroll on Android Device
本文介绍了React Native Nested ScrollView无法在Android设备上滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Android设备上遇到嵌套scrollview的问题,但IOS OK
I have the problem about nested scrollview on Android Device, but IOS OK
如何解决有关B滚动视图无法滚动的问题?
How to fix the issue about B scrollview cant scrolling ?
<ScrollView> // A ScrollView
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
<View>
<ScrollView> // B ScrollView
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
<View><Text>Hello</Text></View>
</ScrollView>
</View>
</ScrollView>
推荐答案
如果API 21作为最低目标是一个选项,可以升级到react-native 0.56.x并尝试新道具 nestedScrollEnabled
。
If API 21 as minimum target is an option, you could upgrade to react-native 0.56.x and try the new prop nestedScrollEnabled
.
注意:它用于子滚动视图,即
Note: it is meant to be used in the child scrollview, i.e.
<ScrollView {...parentProps}>
<ScrollView {...childProps} nestedScrollEnabled={true}>
</ScrollView>
</ScrollView>
这篇关于React Native Nested ScrollView无法在Android设备上滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文