Nested scrollview is not working in react native android but working in ios ?
<ScrollView>
<View> <Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
<View>
<ScrollView>
<View> <Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
<View><Text>Hello</Text> </View>
</ScrollView>
</View>
</ScrollView>
I think @andreicoman11 was looking into something similar.
Or was it @kmagiera? :)
Can you provide some more details on how it's "not working":
- crashing app?
- causing red box?
- not rendering anything?
- not scrolling?
@prashanthnani Any updates?
Just my 2 cents - Android doesn't actually handle nested scroll views that well, have you tried testing the UI using native Android to see if the behaviour differs at all?
Closing since no response. Let's re-open if you're still having the issue.
a horizontal scrollview with nested vertical scrollview will crash the app.
Android version: 4.4.4 KTU84P (MI 3)
I think @prashanthnani means to say it's not scrolling. Same issue with me too.
I have same issue too, have any ways to solve ?
Same issue here
Same issue here
Same issue here
@satya164 Hey Satya, any updates on this ? Facing the same issue on RN 0.37 (android).
No one is working on this AFAIK.
In my case it occasionally works, but it's really difficult to get the child scroller to scroll. I am wondering how scrollers are done on Android, because I can't find any reference to NestedScrollView in RN source?
I have vertical scrollers inside a horizontal (paged) scrolling parent, which is pretty much how the Facebook app works on Android. So they are doing something to get that working smoothly. Any tips @satya164? :)
any solutions?
any updates?
Vertical inside vertical, or horizontal inside horizontal, is a native android problem, and there are a lot of hacky workarounds out there on stackoverflow of folks trying to fix it. I don't know much more about that.
As far having a vertical inside horizontal (or vice versa), this also appears to be a native Android problem. ScrollView children are dependent on the parent scrollview "passing" the touch event to the child. But the parent is basically configured with a certain mTouchSlop (which I can't find a way to override, even in native Java code), which causes it to absorb drags beyond that slop. Since the slop appears to be set low, it often prioritizes scrolling in the outer scrollview, and makes it difficult to scroll in the inner one.
No idea on a fix. In my case, I may need to revert back to using something like a react-native-viewpager (which handles the scroll thresholds itself in JS, and is roughly equivalent to the FlatList functionality I want). Though I recognize that only helps my specific use case, and probably won't help most of you.
any updates?
any updates?