一半圆角矩形

实现的效果如下截图:
 <img src="http://img.blog.csdn.net/20160225105553712?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
自定义 drawable 文件 left_pressed_selector.xml

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

    <item><shape>
            <solid android:color="#ffffff" />

            <stroke android:width="1dp" android:color="#ffffff" />

            <corners android:bottomLeftRadius="5dp" android:bottomRightRadius="0dp" android:topLeftRadius="5dp" android:topRightRadius="0dp" />
        </shape></item>

</selector>

2、right_normal_selector.xml

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

    <item><shape>
            <solid android:color="#0ea3f3" />

            <stroke android:width="1dp" android:color="#ffffff" />

            <corners android:bottomLeftRadius="0dp" android:bottomRightRadius="5dp" android:topLeftRadius="0dp" android:topRightRadius="5dp" />
        </shape></item>

</selector>


你可能感兴趣的:(一半圆角矩形)