preferenceActivity生命周期生命周期、preferenceActivity

2023-09-03 21:03:12 作者:一生一世只爱你一个人

我看了 http://developer.android.com/reference/android/应用程序/ Activity.html 但我有一个约preferenceActivity生命周期的问题:

I read http://developer.android.com/reference/android/app/Activity.html but I have a question about PreferenceActivity lifecycle:

做了preferenceActivity得到的onStop()或onDestory()调用?

Does a PreferenceActivity get onStop() or onDestory() call?

我的理解得到的onStop()调用时,用户点击返回,但对于onDestory()? 什么时候onDesgtory()为preferenceActivity被调用?

I understand it gets onStop() called when user clicks 'Back', but what about onDestory()? when does onDesgtory() for PreferenceActivity get called?

感谢你。

推荐答案

由于 preferenceActivity 活动的一个子类,它应该遵循相同的生命周期。 点击您所提供的链接,然后导航到间接子类或这里是直接的http://developer.android.com/reference/android/$p$pference/$p$pferenceActivity.html

As PreferenceActivity is a subclass of Activity, it should follow the same lifecycle. Click on the link you provided and then navigate to Indirect Subclasses or here is the direct http://developer.android.com/reference/android/preference/PreferenceActivity.html