Ext.: http://my.oschina.net/u/191330/blog/125291
- Mechanism of onintercepttouchevent () and Ontouchevent ():
- 1. The down event is first passed to the Onintercepttouchevent () method
- 2. If the ViewGroup onintercepttouchevent () return False when the down event is received, the subsequent move, up, and so on will continue to be passed to the ViewGroup first. Then the ontouchevent () processing of the final target view is passed down to the same as the down event
- 3. If the ViewGroup onintercepttouchevent () return true after receiving the down event processing , then the subsequent move, Events such as up will no longer be passed to Onintercepttouchevent (), but are passed to the ViewGroup's ontouchevent () processing as the down event, noting that the target view will not receive any events.
- 4. If the Ontouchevent () of the view that eventually needs to handle the event returns false, the event is passed to the ontouchevent () processing of the view at its previous level
- 5. If the ontouchevent () of the view that eventually needs to handle the event returns True, then subsequent events will continue to be passed to the view's ontouchevent () processing.
Onintercepttouchevent and Ontouchevent Call timing