Custom controls (views) Phase 28 Note 10: Custom View Touch Events

Source: Internet
Author: User

1. Transmission of touch events:

(1) Illustrate the transmission of the touch event as follows:

We triggered the touch event when we clicked on the button control inside sub View 02.

• This touch event is first passed to the top-level parent view, and the top-level parent view begins to traverse its own child view (parent view 01 and parent View 02 are child view of the top-level parent view).

Determine if the touch click event is on Parent view 01 or on Parent view 02 , and you know it is above parent view 02 .

• Parent View 02 Iterates over its child view (child view 01 and child View 02 are child views of parent View 02), judging that this touch click event is above sub view 02 .

• Sub View 02 determines that the touch click event is on the button by traversing its own child view again.

(2)

Custom controls (views) Phase 28 Note 10: Custom View Touch Events

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.