Search code examples
androidandroid-activityactivity-lifecycle

finish() and the Activity lifecycle


I'm learning Android programming for a class, and I have a quick question about how finish() fits into the Activity lifecycle.

When you make a call to finish(), what lifecycle callback is started? I presume it's onPause(), then onStop() and onDestroy(). Is this correct?

Really, I just want to make sure that it doesn't jump straight to onDestroy().


Solution

  • You are correct. onPause, onStop, onDestroy.

    Here are the docs.