Suppose Activity1
starts, and then it starts Activity2
. Activity2
performs some task and ends. What
minimal sequence of activity lifecycle methods would be invoked during this? Prefix activity
lifecycle calls with the associated activity. In other words, start your sequence with
Activity1.onCreate()
Asked
Active
Viewed 157 times
-3

Michael
- 1
- 3
2 Answers
1
Try here first https://stackoverflow.com/a/5538421/3720591
This is a easy to find question though, also somewhat demanding lol.

Community
- 1
- 1

Jon Merritt
- 114
- 2
- 11
0
Activity1.onCreate()
Activity1.onStart()
Activity1.onResume()
//intent for Activity2
//finish() method not called here
Activity2.onCreate()
Activity2.onStart()
Activity2.onResume()
//Activity2 performs tasks
//finish() method called
Activity2.onPause()
Activity2.onStop()
Activity2.onDestroy()
Activity1.onResume()
//Activity1 can perform task again

Tushar Patil
- 77
- 1
- 5