背景色根据状态更改颜色 android:backgroup

来源:互联网 发布:淘宝如何换类目 编辑:程序博客网 时间:2024/06/06 03:56
<selector xmlns:android="http://schemas.android.com/apk/res/android">    <item android:state_selected="true"><shape>            <gradient android:angle="0" android:centerColor="#00a59f" android:endColor="#00a59f" android:startColor="#00a59f" />        </shape></item>    <item android:state_focused="true"><shape>            <gradient android:angle="0" android:centerColor="#00a59f" android:endColor="#00a59f" android:startColor="#00a59f" />        </shape></item>    <item android:state_pressed="true"><shape>            <gradient android:angle="0" android:centerColor="#00a59f" android:endColor="#00a59f" android:startColor="#00a59f" />        </shape></item>    <item><shape>            <gradient android:angle="0" android:centerColor="#00ff00" android:endColor="00ff00" android:startColor="00ff00" />        </shape></item></selector>
0 0
原创粉丝点击