Touch Listeners for parent and child views

I have a HorizontalScrollView inside the ViewPager , I turned off the ontouchevent of the view player, but the problem is that the horizontal scroll view is broken by this. It does not work correctly, only moves a little.

I just want to understand the functionality of the touch listeners, onInterceptTouchEvent and touchEvent parent and child views, what is the order in which they are called if I touch the child view?

+4
source share
1 answer

touchEvent is first handled by the child view, if it does not handle it, which means returning false, the parent view will handle it. But onIterceptTouchEvent before touchEvent.

+1
source

All Articles