I have a custom ListPreference that uses an AsyncTask and ProcessDialog. Works great, until I rotate my phone... Here is one possibility to solve this problem, but it requires access to onStop() which only Activities have, but not the ListPreference. So I am wondering: Is there something like this in the ListPreference / Preference class? How to detect Screen rotation from a Preference? Thank you very much!
Asked
Active
Viewed 227 times
1 Answers
0
Easiest way to deal with this will be to change the manifest for your PreferenceActivity subclass:
<activity android:name=".MyPrefs" android:configChanges="orientation|keyboardHidden"
android:label="Preferences" />
This will prevent your activity from being recreated when you change the screen orientation as well as when the OSD keyboard appears.

Thomas Dignan
- 7,052
- 3
- 40
- 48