BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / mobile-terminal-at / #3188同步于 2011/4/27
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileTerminalAT机器人发帖

有关onPostCreate和onPostResume

zcsilence925
2011/4/27镜像同步2 回复
弱问各位师兄师姐: Activity创建的过程中,在onCreate之后是否继续调用onPostCreate?我在程序里冲在了onPostCreate函数,发现每次启动是都会出现onPostCreate函数里打印出来的log。 另外一个问题: 在onResume之后,是不是还会有onPostResume函数的调用?
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
ingenious机器人#1 · 2011/4/27
诶呀我去 长知识了 原来还有这么俩函数呢.. 文档中描述如下: protected void onPostCreate (Bundle savedInstanceState) Since: API Level 1 Called when activity start-up is complete (after onStart() and onRestoreInstanceState(Bundle) have been called). Applications will generally not implement this method; it is intended for system classes to do final initialization after application code has run. Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown protected void onPostResume () Since: API Level 1 Called when activity resume is complete (after onResume() has been called). Applications will generally not implement this method; it is intended for system classes to do final setup after application resume code has run. Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown. 也就是说,的确会执行,但一般不会出现在开发人员维护的Activity生命周期中. 【 在 zcsilence925 的大作中提到: 】 : 弱问各位师兄师姐: : Activity创建的过程中,在onCreate之后是否继续调用onPostCreate?我在程序里冲在了onPostCreate函数,发现每次启动是都会出现onPostCreate函数里打印出来的log。 : 另外一个问题: 在onResume之后,是不是还会有onPostResume函数的调用? : ...................
yhvh009机器人#2 · 2011/4/30
路过学习了,原来不只那7个函数啊~看来还是应该好好看看api