Click here to Skip to main content
15,861,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to understand An Activity full life-cycle.

So I have searched on Google and found lots of tutorials regarding activity life-cycle, but in all tutorials I have not found these methods in life-cycle diagram:
1. OnContentChanged()
2. OnPostCreate()
3. OnPostResume()
4. OnWindowfocusChanged()
5. OnuserLeaveHint()
6. OnUserInteraction()
7. OnDetachedFromWindow()

I would like to known why these method's are not included in activity life-cycle diagram on android docs.

One more question:
When an activity is created for the fist time then system calls the OnContentChanged() method as the first method and last call by system is the OnDetachedFromWindow() method when an activity is killed, but android docs says entire lifetime of an Activity happens between OnCreate() and OnDestroy()?
Posted
Updated 3-Mar-12 6:28am
v2
Comments
André Kraak 3-Mar-12 12:28pm    
Edited question:
Added pre tags
Spelling/Grammar
Removed unnecessary tags
imrankhanandroid 3-Mar-12 14:04pm    
thanks kraak,
can you give me some suggestion about this problem??

1 solution

check this
http://developer.android.com/reference/android/app/Activity.html[^]
you will find which method will call when some changes happens in device.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900