In the layout folder, open the main.xml file and put in the following code:-
<RadioGroup android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="@+id/QueGroup1">
android:id="@+id/QueGroup1">
<RadioButton android:text=" Option 1..........."
android:textColor="#ffff00"
android:id="@+id/RadioButton01"
android:layout_width="wrap_content"
android:checked="true"
android:layout_height="wrap_content">
</RadioButton>
<RadioButton android:text=" Option 2.........."
android:textColor="#ffff00"
android:id="@+id/RadioButton02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"></RadioButton>
</RadioGroup>
User can only select one item (either Option 1 OR option 2) from the Radio Group. Hope that will help.
Roger,
~mytikus
No comments:
Post a Comment