💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
#Spinner 下拉框 点击组件时,出现若干列的数值,用户可以选择其中的一个 ~~~ <?xml version="1.0" encoding="utf-8"?> <LinearLayout 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:orientation="vertical" tools:context="com.suityou.www.suityou.HomeActivity"> <Spinner android:layout_width="wrap_content" //设置高度 android:layout_height="wrap_content" //设置宽度 android:id="@+id/spinner" //设置ID /** * entries:下拉框,提供选择项 * array: 是一个array.xml文件,用来存在数组元素 * geographical:数组名称 */ android:entries="@array/geographical" /> </LinearLayout> ~~~ [下拉框的使用教程](http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0105/2264.html)