Activity的生命周期有三種情況:
** 一個(gè)Activity從創(chuàng)建到消除**
** onCreate()-->onStart()-->onResume()-->onPause()-->onStop()-->onDestroy() **
其對(duì)應(yīng)的意思分別是:
創(chuàng)建 -->可視 -->獲取焦點(diǎn) -->失去焦點(diǎn) -->不可視 -->銷毀** 一個(gè) Activity A 被另一個(gè) Activity B 覆蓋到恢復(fù)到前臺(tái) **
** onPause()-->onStop()-->onRestart()-->onStart()-->onResume() **
其對(duì)應(yīng)的意思分別是:
失去焦點(diǎn) -->不可視 -->重新啟動(dòng) -->可視 -->獲取焦點(diǎn)** 一個(gè) Activity A 被另外一個(gè)窗口樣式 Activity B 覆蓋到重新獲取焦點(diǎn) **
** onPause()-->onResume() **
其對(duì)應(yīng)的意思分別是:
失去焦點(diǎn)-->獲取焦點(diǎn)