Я разрабатываю приложение со списком участников, которые участвуют в разных мероприятиях.
Группа людей, участвующих в группе Игр. Но один человек может участвовать только в одной игре. Итак, я выбрал RadioButton
. Четыре игры, а именно A, B, C и D. Список людей представлен в списке с четырьмя RadioButton
, нам нужно выбрать по одной среди них для каждого человека.
Я пробовал GridView
с настраиваемыми данными строки, как показано ниже ...
<GridView
android:id="@+id/gridViewMarkList"
android:layout_width="match_parent"
android:layout_height="326dp"
android:numColumns="1" >
</GridView>
И My Grid List - это один столбец со следующими данными в 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="100dp"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/Name"
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/A"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:checked="true" />
<RadioButton
android:id="@+id/B"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/C"
android:layout_width="40dp"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/D"
android:layout_width="40dp"
android:layout_height="wrap_content" />
</RadioGroup>
</TableRow>
Now i couldn't retrieve the Data in the Activity..
Дайте мне любое предложение по выполнению этого процесса ..!