Activity Lifecycle
作用:
1.提供一個用來裝各種元件的容器
2.應用程式與使用者互動的介面
3.所有的應用程式都是由Activity啟動
Entire lifetime(完整生命週期):
onCreate()->onStart()->onResume()->onPause()->onStop()->onDestory()
Visible lifetime(可視生命週期):
onStart()->onReume()->onPause()->onStop()
使用者能夠看見Activity
Foreground lifetime(前景生命週期):
onResume()->onPause()
Activity在最上層與使用者互動
資料來源:
http://developer.android.com/intl/zh-tw/reference/android/app/Activity.html