Android--Activity,fragment lifecycle

Source: Internet
Author: User

Activity Lifecyce

Fragment Lifecycle:

Program run:

09-16 13:59:22.883 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnCreate1
09-16 13:59:22.903 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnCreate2
09-16 13:59:22.903 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksPresenter--debug: Taskspresenter
09-16 13:59:22.903 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnCreate3
09-16 13:59:22.903 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: Onattach
09-16 13:59:22.903 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnCreate
09-16 13:59:22.993 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: Oncreateview
09-16 13:59:22.993 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnStart
09-16 13:59:22.993 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnStart
09-16 13:59:22.993 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: Onresume
09-16 13:59:22.993 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: Onresume

Press the back key to return to the desktop:
09-16 13:59:56.633 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnPause
09-16 13:59:56.633 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnPause
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnStop
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnStop
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: Ondestroyview
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnDestroy
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: Ondetach
09-16 13:59:57.093 19022-19022/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnDestroy

Press the home key to return to the desktop:

09-16 14:03:10.973 22295-22295/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnPause
09-16 14:03:10.973 22295-22295/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnPause
09-16 14:03:11.443 22295-22295/com.example.android.architecture.blueprints.todomvp.mock D/TasksFragment--debug: OnStop
09-16 14:03:11.443 22295-22295/com.example.android.architecture.blueprints.todomvp.mock D/TasksActivity--debug: OnStop

Android--Activity,fragment lifecycle

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.