问题描述:

I created a Preference activity

And I create a ListPreference

<ListPreference

android:key="my_list"

android:title="@string/my_list_label"

android:entries="@array/my_list_array"

android:entryValues="@array/my_list_values"

android:defaultValue="@string/default_size_limit"

/>

My question is when I click the ListPreferene, it pops up a dialog, and when I click an entry that, why the onResume() or onCreate() method of my Preference activity is not called?

Thank you.

网友答案:

This is happening due to Activity Lifecycle, see onPause()'s description. This normal and any Dialog will do this, if the UI also becomes completely obscured then onStop will be called too.

相关阅读:
Top