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
Post a Comment