How to make a Preference not save to SharedPreferences?
问题 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? 回答1: Subclass it, override shouldPersist() to return false. 回答2: I've not done it myself, but have you looked into overriding onDialogClosed() ? 来源: https://stackoverflow.com/questions/2488830/how-to-make-a-preference-not-save-to-sharedpreferences