android中的Spinner的使用
先来最终的效果吧: 我们的main.xml文件内容为: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <Spinner android:id="@+id/spinner1" android:layout_width="match_parent" android:layout_height="wrap_content" android:entries="@array/books" /> </LinearLayout> 我们在values目录下面新建了一个arrays.xml文件 文件的内容是: <?xml version="1.0" encoding="u...
