放在drawable文件夹里
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 背景部分 -->
<!-- 形象的表达:bottom代表背景部分在上边缘超出阴影的高度,right代表背景部分在左边超出阴影的宽度(相对应的offset) -->
<item
android:bottom="1dp"
android:right="1dp">
<shape android:shape="rectangle" >
<!--设置里面的颜色endColor startColor改一样的颜色-->
<gradient android:angle="270" android:endColor="@android:color/white" android:startColor="@android:color/white" /> <corners android:bottomLeftRadius="6dip" android:bottomRightRadius="6dip" android:topLeftRadius="6dip" android:topRightRadius="6dip" />
<!--设置圆弧的边框颜色-->
<stroke android:width="1dp" android:color="#e5e4e2" android:dashWidth="1dp"/> </shape> </item></layer-list>