When scrolling a "horizontal" ScrollView within a "vertical" ScrollView, it will scroll horizontally until you scroll too far up/down, then horizontal scrolling will be canceled by the parent "vertical" ScrollView and it'll only scroll vertically from then on. This is a behavior change that was introduced in Titanium 6.3.0.
The old behavior would block the parent ScrollView from scrolling vertically while scrolling the child horizontal ScrollView. This behavior should be restored. (This is also the iOS behavior.)
Steps to Reproduce:
- Build/run the below code for Android using Titanium 6.3.0 or higher.
- Start dragging one of the horizontal ScrollViews. (It's the box containing labels.)
- As you drag it horizontally, drag up or down.
- Notice the parent ScrollView will scroll vertically, but you can no longer scroll the child ScrollView horizontally anymore.
Once you drag up or down while scrolling horizontally, the horizontal ScrollView's scrolling is canceled and only the parent vertical ScrollView can be scrolled.
Parent vertical ScrollView should not be scrollable while scrolling a child horizontal ScrollView. This was the old Android behavior. It is also the iOS behavior.
ScrollViews call the parent view's requestDisallowInterceptTouchEvent() method when scrolling has started. However, Google's SwipeRefreshLayout.requestDisallowInterceptTouchEvent() method ignores the request when made by a child view (in this case a HorizontalScrollView) that does not support nested scrolling. Since it's ignored, the parent ScrollView ends up intercepting and stealing the nested HorizontalScrollView touch events.
You can restore the old behavior by listening to the horizontal ScrollView's "dragstart" and "dragend" events. In the "dragstart" event handler, disable the parent vertical ScrollView. In the "dragend" event handler, re-enable the parent vertical ScrollView.