zoukankan      html  css  js  c++  java
  • Activity生命周期

    An activity has essentially four states:
    ①If an activity in the foreground of the screen (at the top of the stack), it is active or running.
     ②If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), 
    it is paused. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager),
    but can be killed by the system in extreme low memory situations.
    ③If an activity is completely obscured by another activity, it is stopped. It still retains all state and member information, however,
    it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.
    ④If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process. 
    When it is displayed again to the user, it must be completely restarted and restored to its previous state.

    The following diagram shows the important state paths of an Activity. The square rectangles represent callback methods you can implement to perform operations when the Activity moves between states. The colored ovals are major states the Activity can be in.


  • 相关阅读:
    这个我过滤概述UIPickerView键盘处理
    父子控制器
    源码0501-10-掌握-单粒模式
    源码0501-07-GCD的基本使用
    源码0501-04-了解-线程的状态
    源码-0501-01-处理耗时操作
    源码03-02-10-导航控制器简单使用
    spring在ssh框架中到底起到什么作用
    ssh整合
    spring整合hibernate
  • 原文地址:https://www.cnblogs.com/leon19870907/p/2001245.html
Copyright © 2011-2022 走看看