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 1” is NOT checked and “pref 2” to be disabled when “pref 1” is checked.
i.e. exactly opposite of the android:dependancy attribute.
How can I do that?
I don’t think there’s any out-of-the-box solution for it, i.e. an inverted
dependancyattribute. But there’s always the click-listener: