要实现的效果图
下拉列表使用的是 动态ListView + popupWindow实现
1、设置布局
<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"
android:background="#11000000" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" >
<EditText
android:id="@+id/editText"
android:layout_width="200dp"
android:layout_height="40dp" />
<ImageView
android:id="@+id/iv_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/editText"
android:layout_centerVertical="true"
android:background="@drawable/down_arrow" />
</RelativeLayout>
</RelativeLayout>