Spinner
it just use like a ListView
however ,it has two type
dropdown and Dialog
when use dialog we nee to set the prompt
it is the title of the dialog
Prompt屬性值不可以直接輸入文字,必需要先在value/strings.xml裡建立好,或是在程式裡使用setPrompt()設定。Spinner物件的XML範例如下:
<Spinner
android:id="@+id/sp1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/spinner_prompt"
android:spinnerMode="dialog" />
|
layout should combine to this