網上大多博客結論,清單文件Activity未配置configChanges屬性,切到橫屏後,再切回豎屏時,會走兩遍onPause——onSaveInstanceState——onStop——onDestroy——onCreate——onStart——onRestoreInstanceState——onResume 生命週期方法。本人在Android系統不一樣版本通過測試發現,實際狀況和網上大多博客描述不一樣,特記錄下實際測試狀況。有誤解之處,還望指出,共同探討。bash
onPause
onSaveInstanceState
onStop
onDestroy
onCreate
onStart
onRestoreInstanceState
onResume
複製代碼
onConfigurationChanged
複製代碼
onConfigurationChanged
onPause
onSaveInstanceState
onStop
onDestroy
onCreate
onStart
onRestoreInstanceState
onResume
複製代碼
onConfigurationChanged
複製代碼
onPause
onSaveInstanceState
onStop
onDestroy
onCreate
onStart
onRestoreInstanceState
onResume
複製代碼
onConfigurationChanged
複製代碼