我怎么能把所有有活力的无线电布特顿混为一谈?
while (cursor.moveToNext()) {
TableRow row = new TableRow(this);
// CheckBox chk = new CheckBox(this);
RadioButton radioBtn = new RadioButton(this);
// chk.setText(cursor.getString(cursor.getColumnIndex("from_text")));
radioBtn.setText(cursor.getString(cursor.getColumnIndex("from_text")));
radioBtn.
row.addView(radioBtn);
table.addView(row);
}
<>Xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TableLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/myTable"/>
</LinearLayout>