Android 在无线电组中设置顺序
我有一个收音机组,它包含3个按钮:Android 在无线电组中设置顺序,android,radio-group,Android,Radio Group,我有一个收音机组,它包含3个按钮: 小的 中等 大的 这就是它被放在布局中的方式。我不知道为什么,但中号按钮和大号按钮互换了。我还原了它,所以当我现在查看布局时,一切都按正确的顺序排列,但当我运行应用程序时,它们仍然按错误的顺序排列。在无线电组中是否有设置顺序的参数 我得到了相对布局,这是描述单选按钮的代码 <RadioGroup android:id="@+id/size" android:layout_width="186dp" android:layout
- 小的
- 中等
- 大的
<RadioGroup
android:id="@+id/size"
android:layout_width="186dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/ingredients"
android:orientation="vertical" >
<RadioButton
android:id="@+id/small"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:maxHeight="20dp"
android:text="Small" />
<RadioButton
android:id="@+id/medium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="20dp"
android:text="Medium" />
<RadioButton
android:id="@+id/big"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:maxHeight="20dp"
android:text="Big" />
</RadioGroup>
没有代码就没有帮助..所以请发布xml和java代码我不知道会发生什么,但在多次运行之后,一切都正常有序