Dependencies are registered by the "child" preference with the "parent" (whatever is dependent registers with whatever it's dependent on).

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/preference/Preference.java;h=36d676a327250ab99623f343d01d3b56f118a113;hb=refs/heads/master#l1119

When the "parent" preference changes value, it sends a notification to the child, which implements this interface:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/preference/OnDependencyChangeListener.java;h=ce25e34ec9f5bf9d37044825a02e73200f0f2dab;hb=refs/heads/master

Are your child preferences specifying the preference key that matches the parent?

-- Kostya

16.02.2011 4:46, stanly пишет:

but I can't find the real code for real action of setDependency to do?
the real action I mean is about enable/disable bluetooth toggle and bluetooth setting when enable airplane mode,
or this is done in other side?


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to