1) start for the first time: oncreate-> onattach-> oncreate-> oncreateview-> onactivitycreated-> onstart-> onresume
2) press the return key: onpause-> onstop-> ondestroyview-> ondestroy-> ondetach-> ondestroy
Recovery: Because you press the return key to directly destroy the data, the data will be restarted during recovery and the oncreate-> onattach-> ...... And other methods
3) press the Home Key: onpause-> onstop
Recovery Time: onrestart-> onstart-> onresume
4) press the lock screen key: onpause-> onstop
Recovery Time: onrestart-> onstart-> onresume
5) Go to the back Stack: onpause-> onstop-> ondestroyview
Recovery Time: oncreateview-> onactivitycreated-> onstart-> onresume
Through the above analysis, we have come to these conclusions.
[1] onresume is used to restore the Saved state.
[2] onpause is used to save the current state.
[3] onattach is called when you establish a connection with the activity.
[4] ondetach is called when activity is separated.
Thanks http://blog.csdn.net/forever_crying/article/details/8238863/