Up next

Android tutorial (2018) - 83 - Preference API- Listening for Preference changes

6 Views· 14 Aug 2019
ITCOURSES
ITCOURSES
5 subscribers
0

There are several situations in which you might want to be notified when user changes a preference in your app settings page.

In order to receive the user settings change event you have to implement the SharedPreference.OnSharedPreferenceChangeListener interface.

You must register for this interface from the onResume method of your PreferenceFragment or PreferenceActivity by calling the method registerOnSharedPreferenceChangeListener().

Also you must unregister from the listener from the onPause method of your PreferenceFragment or PreferenceActivity by calling the method unregisterOnSharedPreferenceChangeListener().

This video teach you how to handle the settings change in your app settings page, also you can learn about how to update the preference summary when user made a change .


Like my Facebook page : https://www.facebook.com/codeglympse
Subscribe My YouTube channel : http://www.youtube.com/ticoontechnologies

Show more
100% online learning from the world's best universities, organisations and Instructors

 0 Comments sort   Sort By


Up next