On Thu, Dec 30, 2010 at 4:25 PM, dashman <[email protected]> wrote: > i tried to implement > registerOnSharedPrefereneChangeListener() > > - is it correct that it works only from the PreferenceActivity > sub-class.
No. You call that method on a SharedPreferences object. For a PreferenceActivity, you specifically call it on a SharedPreferences object you get from PreferenceManager.getDefaultSharedPreferences(). getDefaultSharedPreferences() can be called with any Context as its parameter (e.g., your main activity). The listener you supply then reacts to the changing preferences however is necessary. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

