Reputation: 2649
What operations can be done under all states of lifecycle and How to effectively use the callbacks of activity lifecycle?
For example, initialization of views can be done in onCreate(), animation can be started in onResume().
Upvotes: 0
Views: 6981
Reputation: 33996
This is the best tutorial for reading the life-cycle of Android.
see the figure1 and figure2 this will help you a lot for understand life-cycle of Android.
Upvotes: 1
Reputation: 1558
Try reading this if you haven't already: http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
One thing I definitely suggest if you are using cursors or simplecursoradapters in your applications is to close the cursors and detach the cursors from your adapters in the onpause, and then reattach them in the onresume method
Upvotes: 0