可直接使用spinner控件实现。
先上效果图
点击下拉按钮时(其实是个imageView图片)
布局文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/et"
android:layout_marginTop="30dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:paddingLeft="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/et_normal"
/>
<ImageView
android:id<