Han Mengfei sha Han Yafei [email protected] yue31313 Han_meng_fei_sha
Three methods: Distribute Touch event dispatchtouchevent, ontouchevent when touching events, onintercepttouchevent when intercepting touch events.
Dispatch is the meaning of dispatch. is the meaning of distribution. Distributes touch events.
Intercept is the meaning of interception.
On there is not only the meaning of what is above, but also what time it means.
Touch events are usually emitted from activity activities by distributing the touch event Dispatchtouchevent method, and as long as it is not used, it is passed down to the bottom view.
If it is at the bottom, it is not used. will begin to pass the direction, and finally to the activity in the touch event when this method is processed.
This method is viewgroup for the view group when intercepting touch events. Can intercept events.
If a view does not use the event when the event arrives, the subsequent move, lifting, will not be given to it.
Android Touch Event Distribution process