I'm looking for an easy way to handle integer and IP-type preference values in a PreferenceActivity. The idea is, to catch the changes in the onSharedPreferenceChanged listener. If the value doesn't fit the required type, it should be either reset to the default value or to the value before the change.
My questions: - how to restore a single value of the shared preferences with the default? - is it possible to get the last value in an easy way?
Thanks in advance!
Thomas