深入viewgroup.onintercepttouchevent一点

当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无法对后续事件感兴趣,则,不用再考虑 拦截放行)

猜你喜欢

转载自baosu.iteye.com/blog/1971172
今日推荐