ListView personalizado com TextView, TextView, RadioGroup no Android
Estou desenvolvendo um aplicativo comListView
para a criação da Lista de Alunos do Aluno.
Nesta aplicação, a lista tem 10 alunos. Há quatro notas previstas para o exame que foi realizado para esses alunos. Um aluno pode adaptar apenas um grau dos quatro.
O professor atribuirá a nota ao aluno emListView
.
Meu arquivo xmlStudentlist.xml é como segue:
<?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>
e meurow.xml arquivo é como segue:
<?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>
Agora estou tentando a saída na forma de:
1 0001 AAAA <RadioButton1> <RadioButton2> <RadioButton3> <RadioButton4>
2 0002 BBBB <RadioButton1> <RadioButton2> <RadioButton3> <RadioButton4>
Como posso usar as funcionalidades do adaptador?
ArrayAdapter<String,String,String,RadiGroup> studList=new ArrayAdapter<String,String,String,RadiGroup>();
Posso usar assim e como desenvolver o Adaptador personalizado para oListView
?
Sugira-me a melhor solução!