android - Not able to trigger an action on selection of an item in ListPreference -


i have list preference in 1 of settings page. want perform action whenever 1 of values in list selected. onclick listener not getting called when item selected. getting called when list name clicked. below relevant code same:

    @targetapi(build.version_codes.honeycomb)     public static class aaflows extends preferencefragment implements preference.onpreferenceclicklistener {         @override         public void oncreate(bundle savedinstancestate) {             super.oncreate(savedinstancestate);             addpreferencesfromresource(r.xml.pref_flows);             sethasoptionsmenu(true);              // bind summaries of edittext/list/dialog/ringtone preferences             // values. when values change, summaries             // updated reflect new value, per android design             // guidelines.             listpreference flows = (listpreference) findpreference(getstring(r.string.pref_key_flows));             flows.setonpreferenceclicklistener(this);             }           @override         public boolean onpreferenceclick(preference preference) {             listpreference flows1 = (listpreference) findpreference(getstring(r.string.pref_key_flows));              log.d("testingoutside2",flows1.getvalue());             return true;         }     } 

how can trigger action when of values in list selected?

below image of list: enter image description here


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -