<item android:state_window_focused="false" android:drawable="@drawable/没有焦点时的图片背景" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/非触摸模式下获得焦点并单击时的背景图片" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/触摸模式下单击时的背景图片" />
<item android:state_selected="true" android:drawable="@drawable/选中时的图片背景" />
<item android:state_focused="true" android:drawable="@drawable/获得焦点时的图片景" />
关于android里面的几种Selector状态
最新推荐文章于 2021-10-10 22:09:18 发布
本文介绍了一种定义UI元素在不同状态下的外观样式的方法,包括聚焦、按下及选中等状态,并展示了如何通过XML文件来实现这些样式的变化。
1279

被折叠的 条评论
为什么被折叠?



