Android Touch Event Distribution process

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.