ITeye博客

深入viewgroup.onintercepttouchevent一点

包su · 2013-11-05 12:24 · android · 移动开发 · Markdown

当father.onintercept返回false时,

意味着:拦截后放行,事件(down) 将传递给 child.ontouch

如果child.ontouch返回false,

后续事件(move和up事件) 将不再传递给 father.onintercept(因为:child已经对后续事件不感兴趣,则,不用再考虑 拦截放行)

如果child.ontouch返回true,

后续事件 将传递给 father.onintercept(因为:child对后续事件感兴趣,仍然要考虑 拦截放行)

 

当father.onintercept返回true时,

意味着:拦截后不放行,事件(down)将不传递给 child.ontouch

后续事件 将不再传递给 father.onintercept(因为:child无法对后续事件感兴趣,则,不用再考虑 拦截放行)

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。