android statelistdrawable基本设置
2016-10-31 13:59
316 查看
在drawable文件夹里,创建:<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/checked"/>
<item android:state_focused="true" android:drawable="@drawable/focus"/>
<item android:state_pressed="true" android:drawable="@drawable/pressed"/>
</selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/checked"/>
<item android:state_focused="true" android:drawable="@drawable/focus"/>
<item android:state_pressed="true" android:drawable="@drawable/pressed"/>
</selector>
相关文章推荐
- Android给一组控件设置StateListDrawable
- android中ColorStateList及StateListDrawable设置Selector
- Android-在XML和Java代码中设置背景在不同状态的效果: <selector>/StateListDrawable
- Android入门——选择器selelctor之ColorStateList和StateListDrawable使用小结
- Android Drawable Resource学习(五)、StateListDrawable
- Android中View(视图)绘制不同状态背景图片原理深入分析以及StateListDrawable使用详解
- 6.4 Android Framework - StateListDrawable
- StateListDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
- Android中View(视图)绘制不同状态背景图片原理深入分析以及StateListDrawable使用详解
- Android中View(视图)绘制不同状态背景图片原理深入分析以及StateListDrawable使用详解
- [Android]代码实现ColorStateList及StateListDrawable
- Android 源码一:StateListDrawable的绘制
- Android中View(视图)绘制不同状态背景图片原理深入分析以及StateListDrawable使用详解
- 利用StateListDrawable当EditText获得,失去焦点时分别设置其内容的不同颜色
- [Android]代码实现ColorStateList及StateListDrawable
- Android中的Drawable资源—— StateListDrawable
- Android StateListDrawable
- [Android]代码实现StateListDrawable
- Android按钮设置文字变色ColorStateList
- 利用StateListDrawable当EditText获得,失去焦点时分别设置其内容的不同颜色