When the activity was first created,
When a dialog pops up, there is no change in the life cycle, still the same as before, because the dialog belongs to the activity
When jumping to other interfaces, OnPause and OnStop are triggered.
Jumping back to just the interface again will trigger Onstart,onresume, and Onpostresume
When the home button is pressed, trigger OnPause and OnStop, the life cycle and jump to the other interface, the same nature.
When the interface is destroyed, the lifetime of the Walk is Onpause,onstop,ondestroy, and more than the previous call to OnDestroy.
The difference between OnStop and OnPause:
When a normal dialog is created, both sides are not called
When an activity dialog is created, OnPause is called and OnStop is not called
OnPause when the activity part is not visible, it will be triggered
OnStop is triggered when the activity is completely invisible, and onstop is not invoked if the subject of the new activity is transparent
The difference between OnStart and Onrestart:
When activity is created, only calling OnStart will not call Onrestart.
The onstart is called every time the activity is never visible to be visible.
OnStart can be understood to be paired with OnStop.
CP Relationship
Onstart-onstop
Onresume-onpause
Life cycle in exceptional situations
Onsaveinstancestate is called only under exceptional circumstances, such as rotating the screen, the original activity is destroyed, and the onsaveinstancestate is called
Android Life cycle