Skip to content Skip to sidebar Skip to footer

How To Use Setonpreferencechangelistener For Quietlycoding Numberpicker?

I want to detect when the value from the NumberPicker is changed. I have this code on my PreferenceActivity: public class MainPrefs extends PreferenceActivity { @Override

Solution 1:

Just looked at your xml file listed here, looks like you have android:key="demo.preference" there. Whereas in the code here, you're using findPreference("NumberPickerLimit").

Solution 2:

You have to call the listener yourself. Instead of notifyChanged(), try callChangeListener(val) as seen here:

NumberPickerPreference

Post a Comment for "How To Use Setonpreferencechangelistener For Quietlycoding Numberpicker?"