Onintercepttouchevent and Ontouchevent Call timing

Source: Internet
Author: User

Ext.: http://my.oschina.net/u/191330/blog/125291

  1. Mechanism of onintercepttouchevent () and Ontouchevent ():
  2.   1. The down event is first passed to the Onintercepttouchevent () method
  3.   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
  4.   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.
  5.   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
  6.   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

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.