Android Activity Fragment Combined Lifecyle

28-08-2016
App Started Rotate Screen Pressed Home Button Back To App from Home
onCreate()

onAttach()

onAttachFragment()

onCreate()

onCreateView()

onActivityCreated()

onStart()

onStart()

onResume()

onResume()
onPause()

onPause()

onSaveInstanceState()

onSaveInstanceState()

onStop()

onStop()

onDestroyView()

onDestroy()

onDetach()

onDestroy()

onCreate()

onAttach()

onAttachFragment()

onCreate()

onCreateView()

onActivityCreated()

onStart()

onStart()

onResume()

onResume()
onPause()

onPause()

onSaveInstanceState()

onSaveInstanceState()

onStop()

onStop()
onRestart()

onStart()

onStart()

onResume()

onResume()

Note: Red and underline methods locate in Activity class, others in Fragment.

Download sample code from here

© 2019 All rights reserved. Codesenior.COM