gpt4 book ai didi

Android:如何垂直对齐:单选按钮顶部到多行文本?

转载 作者:太空狗 更新时间:2023-10-29 13:23:45 41 4
gpt4 key购买 nike

如您所见,我有一个简单的 RadioGroup 及其选项。

<RadioGroup
android:id="@+id/radio_report_problems"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp" >

<RadioButton
android:id="@+id/radiooption_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/report_problem_rd_opt_1" />

<RadioButton
android:id="@+id/radiooption_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/report_problem_rd_opt_2" />

.....

</RadioGroup>

我的问题是项目符号位于文本的中间,而不是从第一行

printscreen

在不使用 tableView 或 linearLayout 的情况下,是否有一种简单的方法可以使用 RadioGroup only 来实现这一点?

谢谢。

最佳答案

我用过

android:gravity="top"

它有效

看这个: enter image description here

关于Android:如何垂直对齐:单选按钮顶部到多行文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24636077/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com