[英]Activity Life Cycle
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: 所以我在Google上搜索并发现了很多关于活动生命周期的教程,但在所有教程中我都没有在生命周期图中找到这些方法:
1. OnContentChanged()
1.
OnContentChanged()
2. OnPostCreate()
2.
OnPostCreate()
3. OnPostResume()
3.
OnPostResume()
4. OnWindowfocusChanged()
4.
OnWindowfocusChanged()
5. OnuserLeaveHint()
5.
OnuserLeaveHint()
6. OnUserInteraction()
6.
OnUserInteraction()
7. OnDetachedFromWindow()
7.
OnDetachedFromWindow()
I would like to known why these method's are not included in activity life-cycle diagram on android docs. 我想知道为什么这些方法不包含在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()
? 当第一次创建一个活动时,系统调用
OnContentChanged()
方法作为第一个方法,系统的最后一次调用是一个活动被杀死时的OnDetachedFromWindow()
方法,但是android文档说一个活动的整个生命周期发生在OnCreate()
之间OnCreate()
和OnDestroy()
?
Check out the Documentation for Activity All of these are in there, and many of them contain more detail than what I've listed here. 查看活动文档所有这些都在那里,其中许多包含的内容比我在此处列出的更详细。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.