Spinner →下拉菜单控件
常用在:
城市的选择,地区的选择和信息的查询等应用。
java.lang.Object
android.view.View
android.view.ViewGroup
android.widget.AdapterView<T extends android.widget.Adapter>
android.widget.AbsSpinner
android.widget.Spinner
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<!--用户选择之后显示到textView上-->
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:lay