I am re-using ListPreference for a setting which I store only in the database. How can I prevent it from storing/persisting any data to the preference file?
Asked
Active
Viewed 1,110 times
2 Answers
3
Subclass it, override shouldPersist()
to return false.

yanchenko
- 56,576
- 33
- 147
- 165
-
1This will work, but the proper way is to simply call `setPersistent(false)`. Documentation for this method is [here](http://developer.android.com/reference/android/preference/Preference.html#setPersistent(boolean)). – XåpplI'-I0llwlg'I - Jan 04 '13 at 17:42
0
I've not done it myself, but have you looked into overriding onDialogClosed()
?

Mark B
- 183,023
- 24
- 297
- 295