I can align the Button elements to the left to left using layout_constraintStart_toStartOf
and layout_constraintEnd_toStartOf
.
(我可以使用layout_constraintStart_toStartOf
和layout_constraintEnd_toStartOf
从左到左对齐Button元素。)
However I'm unable to do that to the radio buttons . (但是我无法对单选按钮执行此操作 。)
How can I align the radio buttons to left to achieve something like this:
(如何将单选按钮向左对齐以实现以下效果:)
Here's the layout:
(这是布局:)
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent" >
<RadioButton
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1" />
<RadioButton
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 2" />
</RadioGroup>
ask by Learner translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…