本文系作者原创,转载请附原文地址,谢谢。
原文地址:http://write.blog.csdn.net/postedit/47342183
前言:
正文:
Android生命周期图
本来还想语言描述一下,但是发现任何语言在这个经典的图面前都是没有必要的。
首先先看一下API文档说了些什么,(我在word中做了一些缩进效果,到这里反而变乱码)
Method |
Description |
Killable? |
Next |
l onCreate() |
Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one. Always followed by onStart(). |
No |
onStart() |
n onRestart() |
Called after your activity has been stopped, prior to it being started again. Always followed by onStart() |
No |
onStart() |
n onStart() |
Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden. |
No |
onResume() or onStop() |
u onResume() |
Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to it. Always followed by onPause(). |
No |
onPause() |
u onPause() |
Called when the system is abo |