drawable目录下新建xml文件选择shape
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- 角度 -->
<corners android:radius="5dp" />
<!--
渐变
<gradient
android:centerColor="#fff"
android:endColor="#0f0"
android:startColor="#f00" />
-->
<!-- 纯色 -->
<solid android:color="#9000" />
<!-- 边框
<stroke
android:width="1dp"
android:color="#000"
android:dashWidth="5dp"
android:dashGap="3dp"
/>
-->
</shape>