06-03 11:13:47.064: INFO/OnInterceptTouchEventTest(21734): MyLayout -- onInterceptTouchEvent --- event.getAction() = 0
06-03 11:13:47.064: INFO/OnInterceptTouchEventTest(21734): MyImageView -- event.getAction() = 0
06-03 11:13:47.142: INFO/OnInterceptTouchEventTest(21734): MyLayout -- onInterceptTouchEvent --- event.getAction() = 2
06-03 11:13:47.142: INFO/OnInterceptTouchEventTest(21734): MyImageView -- event.getAction() = 3
06-03 11:13:47.175: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.192: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.225: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.392: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.425: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.562: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.712: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 2
06-03 11:13:47.842: INFO/OnInterceptTouchEventTest(21734): MyLayout --- onTouchEvent --- event.getAction() = 1
可见,当onInterceptTouchEvent返回true时截获事件,MyLayout的onTouchEvent就被执行,而MyImageView得到cancel事件,onInterceptTouchEvent也不在拦截,直至下一次down事件到来。所以当我们要在ViewGroup中得到非down事件时,down时就不能返回true,而且childView也要返回true,这样onInterceptTouchEvent才会认为自己没处理到,继续截获下一个事件。