Code example for ListPreference

Methods: setOnPreferenceChangeListener, setValueIndex