页面布局:
<?xml version="1.0" encoding="utf-8"?><RadioGroup
android:id="@+id/rdg_gender"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton
android:id="@+id/rbtn_male"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="25sp"
android:text="男" />
<RadioButton
android:id="@+id/rbtn_female"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="25sp"
android:text="女" />
</RadioGroup>