Life cycle triggered by clicking on a click to return to the previous action?

What activity state is triggered when another action is launched in the same application, and then the return button is pressed to return to it?

Which lifecylce method is called during the transition to the previous action?

+4
source share
2 answers

onPause() is called in Activity A when Activity B starts. After the "Back" button is called in Activity B , onResume() is called in Activity A.

+11
source

Which lifecylce method is invoked during the transition to a previous activity?

According to docs : onPause() , onStop() and possibly onDestroy() . In addition to the lifecycle documentation, you can read the documents in Tasks and Back Stack .

+1
source

All Articles