xxv / android-lifecycle

A diagram of the Android Activity / Fragment lifecycle
5.26k stars 681 forks source link

onSaveInstanceState() of Activity is called before onStop(), not onDestroy() #28

Open RexAyanami opened 7 years ago

RexAyanami commented 7 years ago

According to Android doc: (https://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)) In Fragment, this method may be called at any time before onDestroy(); But in Activity, this method will be called before onStop() without guarantees against onPause()