Android Touch Screen Event Summary

Source: Internet
Author: User

Turn from

http://blog.csdn.net/yanbober/article/details/45887547

  1. The Touch Control (View) first executes the Dispatchtouchevent method.
  2. The Ontouch method is executed first in the Dispatchtouchevent method, followed by the OnClick method (the OnClick method executes in ontouchevent, which is analyzed below).
  3. If the control (View) Ontouch returns false or Montouchlistener is null (the control does not have the Setontouchlistener method set) or if the control is not enable, the ontouchevent is dispatched, The Dispatchtouchevent return value is the same as ontouchevent returns.
  4. If the control is not set to enable the Ontouch method will not execute, only by overriding the control's Ontouchevent method (which has been processed above), the Dispatchtouchevent return value is the same as ontouchevent return.
  5. If the control (View) is enable and Ontouch returns True, Dispatchtouchevent returns true directly, and the Ontouchevent method is not called.

Android Touch Screen Event Summary

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.