开发者

Android + When to use onInterceptTouchEvent()?

开发者_开发问答

Sorry if this is vague, but can someone please give me an example of when to use onInterceptTouchEvent()?

I understand the concept, intercepting child view touches in the parent ViewGroup, but why would I need to do tht?

Example usage might help me to better understand it.


When: handler touch event in parent before the event dispatch to the child.

How: create a class extents from ViewGroup(like LinearLayout ...) class and override the onInterceptTouchEvent(), the you can process something you want in the method.

see: the-order-of-click-event-handled-by-parent-view-and-child-view

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜