怎么办preference属性的android的反面:依赖关系?反面、属性、关系、preference

由网友(予你痴情赠我伤痛)分享简介:是否有确实的 Android的完全相反的XML属性:依赖? 我想依赖preference它被选中时,启用时,另一种是不检查和残疾人。What I would like the dependent preference to be enabled when the other is NOT checked and d...

是否有确实的 Android的完全相反的XML属性:依赖

我想依赖preference它被选中时,启用时,另一种是不检查和残疾人。

What I would like the dependent preference to be enabled when the other is NOT checked and disabled when it IS checked.

编辑:也许这个问题是不是与安卓依赖也许有一个XML属性,我可以添加使默认为preference禁用,那么 Android的:依赖将切换它相反的方式像我想

edit: maybe the issue isn't with android:dependency maybe there is an xml attribute that I can add to make the default for that preference disabled and then android:dependency will toggle it the opposite way like i want.

再修改: 我尝试设置安卓启用=假在preference和禁止它像我想要的,但即使它是依赖于其他的preference它没能像我所希望的。

edit again: I tried setting android:enabled="false" in the preference and it disables it like i want but even with it being dependent on the other preference it didn't enable it like i had hoped

推荐答案

居然发现它在我自己想通我只是张贴在这里,以帮助任何人可能有同样的问题:

Actually found it on my own and figured I'd just post it here to help anyone that might have this same issue:

android:disableDependentsState="true"

提出,在控制preference。

Put that in the controlling preference.

阅读全文

相关推荐

最新文章