Activity Life Cycle:
- The
Activity
class has defined dozens of callback functions, all begin with "on". - Some of them are triggered by UI events, some are lifecycle related. It isn't easy for developer to remember the usage of them.
- 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