显示四边的边框
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" ><solid android:color="@color/color_red_text" />
<stroke
android:width="0.8dp"
android:color="#000000" />
</shape>
显示缺边的边框
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- This is the main color -->
<item>
<shape>
<solid android:color="#000000" /> <!--线条色 -->
</shape>
</item>
<!-- This is the line -->
<item
android:bottom="1dp"
android:top="1dp"
android:right="1dp"> <!--要显示的边 -->
<shape>
<solid android:color="@color/color_red_text" /> <!--填充色 -->
</shape>
</item>
</layer-list>