ListView
学生マークリスト作成用のアプリケーションを開発しています。
このアプリケーションでは、リストに 10 人の生徒がいます。それらの学生に実施された試験には、4つのグレードが用意されています。1 人の生徒は 4 つの学年から 1 つの学年しか適応できません。
教師は で生徒に成績を割り当てListView
ます。
私のxmlファイルStudentlist.xmlは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
私のrow.xmlファイルは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="500dp"
android:layout_height="fill_parent"
android:padding="10dp" >
<TableRow>
<TextView
android:id="@+id/SNo"
style="@style/text"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/StudNo"
style="@style/text"
android:layout_width="80dp"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/StudName"
style="@style/text"
android:layout_width="180dp"
android:layout_height="wrap_content" />
<RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/radio0"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:checked="true" />
<RadioButton
android:id="@+id/radio1"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/radio3"
android:layout_width="40dp"
android:layout_height="wrap_content" />
</RadioGroup>
</TableRow>
今、私は次の形式で出力を試みています:
1 0001 AAAA <RadioButton1> <RadioButton2> <RadioButton3> <RadioButton4>
2 0002 BBBB <RadioButton1> <RadioButton2> <RadioButton3> <RadioButton4>
アダプター機能を使用するにはどうすればよいですか?
ArrayAdapter<String,String,String,RadiGroup> studList=new ArrayAdapter<String,String,String,RadiGroup>();
このように使用できますListView
か?
最善の解決策を提案してください!