gpt4 book ai didi

android - 选择器项目android :state_xxx ="false" vs item without state ( default )

转载 作者:行者123 更新时间:2023-11-29 18:04:52 24 4
gpt4 key购买 nike

<item android:state_enabled="false" android:color="@android:color/bright_foreground_dark_disabled"/>
<item android:color="@android:color/bright_foreground_dark"/>

这两者有什么区别?根据文档,当状态未启用时使用第一项的颜色,第二项是默认颜色。那么,如果该项目未启用,则使用哪种颜色?

最佳答案

如果该项目未启用,则使用第一个 item,因为它匹配其所有 state 选择器。选择器项从上到下检查,第一个匹配 state 的项被使用。

关于android - 选择器项目android :state_xxx ="false" vs item without state ( default ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13960101/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com