zoukankan      html  css  js  c++  java
  • Android -- Activity,Fragment lifecycle

    Activity Lifecyce

    Fragment Lifecycle:

    程序运行:

    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

    按返回键回到桌面:
    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

    按home键回到桌面:

    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

  • 相关阅读:
    C#多线程开发中如何更新UI界面控件内容
    C#中Invoke的用法(转)
    while loop, for loop
    basic bash learning 1
    Some useful link for leaning linux shell
    How to Adding ExtendReport in test framework
    如何解决Extent report 无法加载CSS样式 的问题
    Capturing Screenshots
    WebDriver switching to new window
    Data Driven Testing
  • 原文地址:https://www.cnblogs.com/yarightok/p/5877534.html
Copyright © 2011-2022 走看看