关于Android的selector背景选择器的配置不起作用的问题
2013-02-23 13:10
435 查看
在Android的UI设计中我们一般会使用selector来配置控件处于不同状态的背景,关于selector的使用我就不多作介绍了,网上有很多的例子,这里要讲的是selector的使用中需要注意的一些地方。
selector的使用需要注意的地方主要有两个:
1、Android系统在根据控件的不同状态来选择控件的背景时,将按顺序从selector中找到第一条匹配的item,然后设置控件的背景,所以,如果发现配置的背景不起作用时,先检查该配置之前的项目是否匹配该状态,或者调整item的顺序
2、selector文件中最多只能有6个item,超出之后的item将不起作用。
selector的使用需要注意的地方主要有两个:
1、Android系统在根据控件的不同状态来选择控件的背景时,将按顺序从selector中找到第一条匹配的item,然后设置控件的背景,所以,如果发现配置的背景不起作用时,先检查该配置之前的项目是否匹配该状态,或者调整item的顺序
2、selector文件中最多只能有6个item,超出之后的item将不起作用。
相关文章推荐
- 关于android Button按钮变换背景选择器不好用问题
- 浅谈android的selector背景选择器
- android:背景选择器-selector
- Android的selector 背景选择器
- 浅谈android的selector,背景选择器
- android背景选择器selector用法汇总
- 浅谈android的selector背景选择器
- android的selector背景选择器
- Android 关于selector中item顺序的问题
- 诡异的问题,关于Android环境配置
- Android的selector,Button按钮背景选择器
- 菜鸟学Android 之 selector背景选择器
- 浅谈android的selector,背景选择器
- Android Selector 背景选择器
- android背景选择器selector用法汇总
- android项目从零开始 TextView setTextColor等背景选择器设置失败问题
- 【Android】Android背景选择器selector用法汇总
- android背景选择器selector用法汇总
- android selector背景选择器
- Android的selector,背景选择器