override - preference value doesn't change when overridden with 'OnPreferenceChangeListener' - Android -


i've implemented onpreferencechangelistener on 2 preference object in preference page ( extends preferenceactivity)
ever since preference value isn't updated upon change,
tried using :

sharedpreferences sharedpreferences = getsharedpreferences("mycustomsharedprefs",         activity.mode_private); sharedpreferences.editor editor = sharedpreferences.edit(); editor.putint(preference.getkey(), integer.parseint(newvalue.tostring())); editor.commit(); 

where preference changed preference , newvalue new value...
missing ?

thanks

you need return true value updated, see android documentation.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -