From this example:
private static Preference.OnPreferenceClickListener BindToPreferenceClickListener = new Preference.OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
boolean isHandled = false;
if (...) {
isHandled = true;
}
return isHandled;
}
}
What does the return value of ‘true’ do? The API documentation states that the value indicates that the click was handled if ‘true’, but what does that really mean? I thought it meant that the editor for the passed preference was not called and a custom editor could be used instead, but my experimentation concludes that the default editor is called in either state.
It means that when someone clicks the preference your listener has a chance to deal with the click.
If you handle the click you return true.
If you do not handle the click i.e. you don’t do anything when this is clicked you can return false and the system will then pass the click on to the next listener that is listening for an on click for that preference.
I can’t think of an example where you would listen for the click then not handle it sorry.