How to make a Preference not save to SharedPreferences?
-
21-09-2019 - |
Question
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?
Solution
Subclass it, override shouldPersist()
to return false.
OTHER TIPS
I've not done it myself, but have you looked into overriding onDialogClosed()
?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow