activity存在的三种状态
来源:互联网 发布:上海网络推广招聘 编辑:程序博客网 时间:2024/04/30 11:20
An activity can exist in essentially three states:
Resumed
The activity is in the foreground of the screen and has user focus. (This state is also sometimes referred to as "running".)
Paused
Another activity is in the foreground and has focus, but this one is still visible. That is, another activity is visible on top of this one and that activity is partially transparent or doesn't cover the entire screen. A paused activity is completely alive (the Activity object is retained in memory, it maintains all state and member information, and remains attached to the window manager), but can be killed by the system in extremely low memory situations.
Stopped
The activity is completely obscured by another activity (the activity is now in the "background"). A stopped activity is also still alive (the Activity object is retained in memory, it maintains all state and member information, but is not attached to the window manager). However, it is no longer visible to the user and it can be killed by the system when memory is needed elsewhere.
If an activity is paused or stopped, the system can drop it from memory either by asking it to finish (calling its finish() method), or simply killing its process. When the activity is opened again (after being finished or killed), it must be created all over.
Resumed
The activity is in the foreground of the screen and has user focus. (This state is also sometimes referred to as "running".)
Paused
Another activity is in the foreground and has focus, but this one is still visible. That is, another activity is visible on top of this one and that activity is partially transparent or doesn't cover the entire screen. A paused activity is completely alive (the Activity object is retained in memory, it maintains all state and member information, and remains attached to the window manager), but can be killed by the system in extremely low memory situations.
Stopped
The activity is completely obscured by another activity (the activity is now in the "background"). A stopped activity is also still alive (the Activity object is retained in memory, it maintains all state and member information, but is not attached to the window manager). However, it is no longer visible to the user and it can be killed by the system when memory is needed elsewhere.
If an activity is paused or stopped, the system can drop it from memory either by asking it to finish (calling its finish() method), or simply killing its process. When the activity is opened again (after being finished or killed), it must be created all over.
- activity存在的三种状态
- 【activity】android activity详解三:保存activity的状态
- Android之Activity的三种状态陈述
- Activity 三中状态和生命周期的7种方法
- 恢复系统回收activity中存在的数据和状态
- Activity保存状态(三)
- android activity详解三:保存activity的状态
- android activity详解三:保存activity的状态
- android activity详解三:保存activity的状态
- android activity详解三:保存activity的状态 .
- Activity入门---Activity生命周期及三种状态+案例
- Hibernate持久化对象存在三种状态
- activity的四种状态
- Activity的四种状态:
- Activity的四种状态
- Activity 的四种状态
- Activity的四种状态
- Activity的四种状态
- Logback在调用打印方法后所做的事
- Logback笔记
- 在windows XP下搭建android开发环境
- android一周小结
- android第二周小结
- activity存在的三种状态
- onPause()方法的特殊性
- android第三周小结
- LeetCode (Z)
- android process and thread
- 没有单元测试,怎能写代码
- 最近两周android总结
- 额~~~~
- intent and service