先上一张效果图:
![](https://img-blog.csdnimg.cn/20200521222743473.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2ppbnl1X21vYmFv,size_16,color_FFFFFF,t_70)
在drawable目录下建一个xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#FAC3C3"/>
<corners
android:radius="9dip"/>
<stroke
android:width="0.5px"
android:color="#F18C8C"/>
</shape>
</item>
</layer-list>
并且在edittext中引用:
<EditText
android:id="@+id/et_choice"
android:background="@drawable/edit_bg"
android:layout_width="110dp"
android:layout_height="30dp">
然后再建立一个xml在layout中,作为下拉菜单子项样式:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:and