Make Preference look disabled, but still register clicks
问题 So during certain states in my app, I want to disable certain CheckBoxPreferences in my setting-menu. However, if the user clicks them, I want an explanatory toast to be shown. If i just do setEnable(false); on the CheckBoxPreference, I do get the right look and feel. But I cant get a toast to be shown on click. On the other hand, I have failed in manually making a CheckBoxPreference look like it is disabled. 回答1: Instead of disabling the preference, you can as well disable the views of the