<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="選項 1" />
<RadioButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="選項 2" />
</RadioGroup>
layout_width="0dp" + layout_weight="1" 表示「不佔固定寬度,按權重平分剩餘空間」。若需固定間距而非平分,可在 RadioButton 外層包裹 LinearLayout 並設置 layout_margin,或使用 ConstraintLayout 鏈式佈局(app:layout_constraintHorizontal_chainStyle="spread_inside")。