2013-11-20 11 views

回答

1

使用CheckBox如果用戶可以選擇多個選項。

RadioButton是用於當用戶只能選擇一個選項。

至於佈局:

這要看,有很多可能的解決方案,一種可能性是:

<!--not all attributes are included,such as width and height, you have to add them--> 
<LinearLayout android:orientation="vertical"> 
    <TextView /> 
    <LinearLayout android:orientation="horizontal"> <!--contains options--> 
     <CheckBox /> <CheckBox/> <CheckBox /> 
    </LinearLayout> 
</LinearLayout> 
+0

你能推薦我應該使用的LayOut嗎? –

+0

檢查更新的答案 –

3

使用TextView的提問和ListView與下面

的答案有多種選擇
ListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); 
相關問題