更新时间:2023-02-03 20:53:30
您可以使用依赖
属性做到这一点。在你的 preference
XML,你将下面的行添加到您的 checkbox_ preF2
, checkbox_ preF3
和 checkbox_ preF2
preferences:
You can do this with the dependency
attribute. In your Preference
XML, you would add the following line to your checkbox_pref2
, checkbox_pref3
, and checkbox_pref2
Preferences:
android:dependency="checkbox_pref1"
相关链接:
Android preference文档(#dependency)