I have used PreferenceActivity to have preference in my android application. I want one preference say \"pref 2\" to be enabled when other preference say \"pref
According to the docs here, you can add an attribute to the CheckBoxPreference tag like so:
android:disableDependentsState="true"
By default this is false, which means that the dependents are disabled when the checkbox is unchecked, but by setting it to true, it should have the opposite effect.