У меня есть 4 радиокнопки, которые я хочу сгруппировать в радиогруппу, а также отображать каждую из них в строке, я использовал для этого LinearLayout, но радиокнопки внутри него, кажется, игнорируют, что они находятся внутри RadioGroup (я хочу выбрать больше, чем один переключатель).
<RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/linearLayout1"
android:layout_below="@+id/linearLayout1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/Radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton" />
<RadioButton
android:id="@+id/Radio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/Radio3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton" />
<RadioButton
android:id="@+id/Radio4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton" />
</LinearLayout>
</LinearLayout>
</RadioGroup>
так есть ли способ сделать это?
LinearLayout
, посколькуRadioGroup
LinearLayout
. - person CommonsWare   schedule 24.04.2014