How to select single item from a RadioGroup. I have shared a sample code. Helps will be appreciated.
<RadioGroup
android:id="@+id/gender"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/custom_edit_text"
android:orientation="horizontal">
<RadioButton
android:id="@+id/male"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/male" />
<RadioButton
android:id="@+id/female"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/female" />
</RadioGroup>