先写几个自己常用的 drawable
圆角背景 (渐变背景)
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffFF" /> //颜色
<corners
android:radius="15dp"/> //圆角角度
<gradient
android:startColor="#143927" //背景颜色 可实现渐变背景 不需要可以去掉
android:endColor="#13E37B" //背景颜色
android:angle="180" //渐变旋转角度
/>
</shape>
RedioButton 选中(未选中)状态时的图片显示
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/home_selected" android:state_checked="true" /> //RedioButton 选中状态时的图片显示
<item android:drawable="@drawable/home" android:state_checked="false" />// RedioButton 未选中状态时的图片显示
</selector>
RedioButton 选中(未选中)状态时的字体显示
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#FF333333" android:state_checked="true" /> //字体选中时状态
<item android:color="#FF999999" android:state_checked="false" />// 字体未选中状态
</selector>
按钮按下(松开)时状态
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#FF333333" android:state_pressed="true" /> //RedioButton 按钮按下状态
<item android:color="#FF999999" android:state_pressed="false" />//RedioButton 按钮松开时状态
</selector>
等什么时候再用到再补