我在一个单选组下有 7 个单选按钮。我使用orientation = "horizontal"
. 但一次只能看到 4 个,其余的则不可见。
有什么方法可以在第二排显示其余的按钮,同时将所有这些“单选按钮”保留在一个“单选组”中?
如果您需要我的代码 -
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1 BHK" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1.5 BHK" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2 BHK" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2.5 BHK" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2 BHK" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2.5 BHK" />
</RadioGroup>