void (Preference l, Preference pm) { l.setOnPreferenceClickListener((p) -> true); pm.setOnPreferenceClickListener(new OnPreferenceClickListener() { public boolean onPreferenceClick(Preference preference) { return true; } }); }