---
title: "深入viewgroup.onintercepttouchevent一点"
author: "包su"
date: "2013-11-05T12:24:10Z"
tags: []
categories: ["移动开发"]
slug: "viewgroup-onintercepttouchevent"
draft: false
lastmod: "2013-11-05T12:25:39Z"
id: 1971172
url: "https://baosu.iteye.com/blog/1971172"
---

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