CheckboxPreference onClick()
问题 I want to implement a 2 part preference screen. If checkbox is clicked, first category should lock and 2nd one unlock. If it's not, reverse. Now I see it only works if I go to previous activity and then to new (sharedPreferences). What listener should I override and how? 回答1: You could try something like: final Preference otherpref = (Preference) findPreference("otherpref"); final Preference pref = (Preference) findPreference("checkbox"); pPref.setOnPreferenceClickListener(new