第一步:
新建文件
得到一个select文件,需要将selector改为shape
代码xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!--背景颜色-->
<solid android:color="@color/colorAccent"/>
<!--边框-->
<stroke
android:width="2dp"
android:color="#ff00ff00"/>
<!--弧度-->
<corners
android:radius="25dp" />
</shape>
效果图