Android annotation injection @afterview Execution time

Source: Internet
Author: User

01-20 13:52:28.888 3870-3870/cc.android.supu i/system.out: Parent class OnCreate
01-20 13:52:28.888 3870-3870/cc.android.supu i/system.out: sub-class OnCreate
01-20 13:52:28.903 3870-3870/cc.android.supu i/system.out: sub-class Afterview
01-20 13:52:28.906 3870-3870/cc.android.supu i/system.out: Parent class OnStart
01-20 13:52:28.906 3870-3870/cc.android.supu i/system.out: sub-class OnStart
01-20 13:52:28.906 3870-3870/cc.android.supu i/system.out: Parent class Onresume
01-20 13:52:28.906 3870-3870/cc.android.supu i/system.out: sub-class Onresume

01-20 13:52:28.960 3870-3870/cc.android.supu i/system.out: Sub-category menu Oncreateoptionenu


So if @after in the subclass wants to initialize the attributes in the parent class: For example, subclasses inherit a Actionbar common class, and subclasses want to control whether the common class Actionbar display ProgressBar or set the title of the Actionbar when initializing. Then this is the subclass of the Aferview injection method first executed, by the execution order of the above, the parent class (common Class) initialization method to put into the onstart, this way the class set of properties in the parent class only function.

Android annotation injection @afterview Execution time

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.