Skip to content

Instantly share code, notes, and snippets.

@zeuxisoo
Created July 3, 2011 08:17
Show Gist options
  • Save zeuxisoo/1062065 to your computer and use it in GitHub Desktop.
Save zeuxisoo/1062065 to your computer and use it in GitHub Desktop.
[Android] Activity Processing State
第一次執行時:
- onCreate ---> onStart() ---> onResume()
Activity A 打開 Activity B:
- Activity A: onPause() --–> 等待 B 創建 ---> onStop()
- Activity B: onCreate() ---> onStart() ---> onResume()
按返回鍵,回到 Activity A 時:
- Activity B: onPause() --–> 等待 A 恢復 ---> onStop() --–> onDestory()
- Activity A: onRestart() ---> onStart() --–> onResume()
參考:
http://blog.csdn.net/zhangweia/article/details/6453800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment