I need to find a way to toggle the return value when clicking my CheckboxPreference. I have already set a key in my settings.xml. The click works fine, I'm just curious about how to return a new value upon each click.
final Preference disableRemixingPref = (Preference) findPreference("disableRemixing");
disableRemixingPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
// I don't always want to return true here. Basically, on every click I want to return the opposite of what the selection was before.
return true;
}
});