开发者

Touch Listeners for Parent and Child Views

开发者 https://www.devze.com 2023-04-04 19:11 出处:网络
I have a HorizontalScrollView inside a ViewPager , I have disabled the ontouchevent of the view pager, but the problem is horizontal scroll view is disturbed by this. It doesn\'t work properly, only m

I have a HorizontalScrollView inside a ViewPager , I have disabled the ontouchevent of the view pager, but the problem is horizontal scroll view is disturbed by this. It doesn't work properly, only moves a little.

I just want to understand the touch listeners functionality , onInterceptTouchEvent and touchEvent of the parent开发者_JAVA百科 and child view, what is the order their calling if i touch on a child view?


touchEvent is first be handled by child View , if it doesn't handle it ,which means return false,the parent view will handle it. But onIterceptTouchEvent is before touchEvent.

0

精彩评论

暂无评论...
验证码 换一张
取 消