Touch event Transmission

Source: Internet
Author: User
① Trigger dispatchtouchevent of activity ② trigger onuserinteraction of activity ③ trigger dispatchtouchevent of layout (I .e. viewgroup) ④ trigger onintercepttouchevent of layout (I .e. viewgroup) ⑤ trigger ontouchevent of view at last. Details: when a touchevent occurs, the activity first transmits the touchevent to the top-level viewtouchevent and then distributes the dispatchtouchevent Method to the top-level view. If the dispatchtouchevent method returns true, the ontouchevent is handed over to the view for processing. If dispatchtouchevent returns false, it is handed over to the view's interceptt The ouchevent method determines whether to intercept this event. If intercepttouchevent returns true, that is, if it is intercepted, the ontouchevent is handed over to it for processing. If intercepttouchevent returns false, it is passed to the subview, the dispatchtouchevent of the sub-view is used to distribute the event. If the event is passed to the ontouchevent of the subview of a certain layer, the method returns false, and the event will be passed up from this view, which is received by ontouchevent. If false is returned when the ontouchevent is passed to the top, the event will disappear and the next event will not be received.

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.