1

Is it possible to use revert dependencies?

<Preference android:key="test"
    android:title="@string/test" android:summary="@string/test_summary"
    android:dependency="dependOn" />

In this example the test preference is shown if dependOn is selected, but i want it the other way round.

developer_joe
  • 301
  • 4
  • 15
  • 1
    I believe this is what you are looking for http://stackoverflow.com/questions/3591901/how-to-do-opposite-of-of-preference-attribute-androiddependency/3591956#3591956 – hector6872 Jul 03 '12 at 01:03

2 Answers2

6

You can actually achieve this by setting:

android:disableDependentsState="true"

in your dependOn definition.

StefaX
  • 91
  • 1
  • 5
0

You could place a listener on the dependOn checkbox and enable the test preference as dependOn becomes selected.

Regards, Stéphane

Snicolas
  • 37,840
  • 15
  • 114
  • 173