Android開発をしていて、端末回転時のライフサイクルの確認をしたくなる時がちょこちょこあったので備忘録を残す。
-----------------Activity起動-----------------
D/debug: onCreate()
D/debug: setUp()
D/debug: onStart()
D/debug: onResume()
-------------------端末回転-------------------
D/debug: onSaveInstanceState()
D/debug: onDestroy()
D/debug: onCreate()
D/debug: onStart()
D/debug: onRestoreInstanceState()
D/debug: onResume()
ついでに基本的なActivity(とFragment)のライフサイクルも記載する。
Activityのライフサイクル
https://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
Fragmentのライフサイクル
https://developer.android.com/guide/components/fragments.html#Creating