background

按钮 背景
<?xml version="1.0" encoding="utf-8"?>
<selector
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/control3_1" android:state_enabled="true" android:state_focused="true" android:state_pressed="false"/>
    <item android:drawable="@drawable/control3_1" android:state_enabled="true" android:state_pressed="true"/>
    <item android:drawable="@drawable/control3_1" android:state_checked="true" android:state_enabled="true"/>
    <item android:drawable="@drawable/control3_0"/>
</selector>

check_box 背景
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/check_true1" android:state_checked="true"></item>
<item android:drawable="@drawable/check_true1" android:state_selected="true"></item>
<item android:drawable="@drawable/check_false1"></item>
</selector>

 

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_checked="true" android:state_pressed="true" android:drawable="@mipmap/link_check" />
    <item android:state_checked="false" android:state_pressed="true" android:drawable="@mipmap/link_uncheck" />
    <item android:state_checked="false" android:drawable="@mipmap/link_uncheck" />
    <item android:state_checked="true" android:drawable="@mipmap/link_check" />
</selector>

 

单背景色
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#3B87F6"/>
    <corners android:radius="6dp"
        />
</shape>

圆 背景色

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval"
    android:useLevel="false">

    <solid android:color="@color/background9"/>
    <stroke
        android:width="1dp"
        android:color="@color/background9" />
    <size
        android:width="48dp"
        android:height="48dp" />
</shape>

背景渐变色

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="12dp"
        />
    <gradient
        android:angle="0"
        android:startColor="#3F9BF0"
        android:endColor="#1C71E6"
   />
</shape>

 

图片旋转

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <rotate
            android:drawable="@drawable/loading_icon"
            android:fromDegrees="0.0"
            android:pivotX="50.0%"
            android:pivotY="50.0%"
            android:toDegrees="360.0"/>
    </item>
</layer-list>

 

单线条边框背景
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <corners android:radius="10dp"/>
    <stroke
        android:width="1dp"
        android:color="@color/textcolor59"
        />
</shape>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值