我正在开发一个安卓应用程序。我注册了一个意图过滤器。我是否必须将 onCreate() 中的初始设置代码复制到 onResume() 函数中?还是会在进入 onResume() 之前调用 onCreate()?
谢谢
编辑:大声笑,不知道我怎么没想到搜索:http: //developer.android.com/guide/topics/intents/intents-filters.html
我正在开发一个安卓应用程序。我注册了一个意图过滤器。我是否必须将 onCreate() 中的初始设置代码复制到 onResume() 函数中?还是会在进入 onResume() 之前调用 onCreate()?
谢谢
编辑:大声笑,不知道我怎么没想到搜索:http: //developer.android.com/guide/topics/intents/intents-filters.html
onCreate 总是在你的活动被创建时被调用,不管是什么触发了正在显示的活动。在有关活动生命周期的官方文档中对此也不例外:http: //developer.android.com/guide/topics/fundamentals/activities.html