android:choiceMode="singleChoice"如下:
<ListView android:id="@+id/list_content" android:layout_width="match_parent" android:layout_height="match_parent" android:choiceMode="singleChoice" > </ListView>
2 在適配器中填充佈局的時候填充
android.R.layout.simple_list_item_single_choice
返回爲
CheckedTextView
如下:CheckedTextView view = (CheckedTextView) (convertView == null ? LayoutInflater.from(context).inflate(android.R.layout.simple_list_item_single_choice, parent, false) : convertView);然後將view當成RadioButton來用即可