1

When my PreferenceActivity rotates, it does not remember which PreferenceScreen was open. Instead it shows the root preference screen again. Why?

kebab
  • 211
  • 3
  • 4
  • 2
    Well, I can't answer my own question yet... so here's a comment with the answer: Make sure your PreferenceScreen elements in the XML you load with 'addPreferencesFromResource' have values for android:key. If they do not have android:key, Android won't automatically choose the correct screen to show after a rotation. This isn't documented ANYWHERE, thus the self-answering question to help whoever has the same problem :) – kebab Jun 18 '11 at 10:36

0 Answers0