Start the

onCreate() ——> onStart() ——-> onResume()

exit

onPause() ——–> onStop() ——–>onDestory()

Home button

onPause() ——–> onStop()

After the Home button, open again

onRestart() ——–> onStart() ——-> onResume()

Activity A Jumps to ActiivtyB

  • A: onPause() ——–> onStop()
  • B: the onCreate () — — — — — – > onStart () — — — — — – > onResume ()

Activity B Returns Activity A

  • B: onPause () — — — — — — — — > onStop () — — — — — — — — > onDestory ()
  • A: onRestart () — — — — — — — – > onStart () — — — — — – > onResume ()

Received a phone call

onPause() ——–> onStop()

Hang up the phone

onRestart() ——–> onStart() ——-> onResume()

landscape

onPause() ——–> onStop() ——–>onDestory() ——–> onCreate() ——> onStart() ——-> onRestoreInstanceState ——>onResume()

Landscape return

onPause() ——–> onStop() ——–>onDestory() ——–> onCreate() ——> onStart() ——-> onRestoreInstanceState ——>onResume()

Set the configChanges = “orientation” | screenSize “somehow the screen switch

OnConfigurationChanged () only takes this method

Lock screen:

onPause() ——–> onStop()

Unlock:

onRestart() ——–> onStart() ——-> onResume()

Popover style Activity

onPause()

The popover style Actiivty returns

onResume()