I have the problem about nested scrollview on Android Device, but IOS OK
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>
To fix ScrollView Not scrolling with React Native, we wrap the content of the ScrollView with the ScrollView. to wrap ScrollView around the Text components that we render inside. As a result, we should see text inside and we can scroll up and down.
Add "nestedScrollEnabled={true}" property to the internal ScrollView and it will work as expected.
Nested scrolling is enabled by default. Wich means: NestedScrollView is when you need a scrollView inside another scrollView. This is enable by default on newer versions of android, and all IOS versions, but you can set this to true and it will works on everything.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With