Wednesday, 7 March 2012

Android Activity Life Cycle


Activity Life Cycle:

  1. The Activity class has defined dozens of callback functions, all begin with "on".
  2. Some of them are triggered by UI events, some are lifecycle related. It isn't easy for developer to remember the usage of them.
  3. An activity has essentially four states, when some event happens, like user navigates between different activities, state transites.

1. onCreate()
2. onStart()
3. onRestart()
4. onResume()
5. onPause()
6. onStop()
7. onDestroy()




No comments:

Post a Comment