mystic mystic - 11 months ago 67
Android Question

What method is called from the backstack

Please what method gets called when an activity is shown again from the backstack after a BackPress on a previous activity. I've tried the onActivityReenter but it doesn't get called as i expected.

Answer Source

If the Activity isn't destroyed form the OS. Then it would first invoke onRestart(), followed by onStart() and onResume(). If the Activity has been destroyed then it would invoke onCreate() instead of onRestart()

Read more here and here

Here is a diagram of the lifecycle:

enter image description here