android RadioButton 选项位于文本右侧
如何创建一个带有文本右侧选项的 RadioButton
?
How can I create a RadioButton
with the option on the right side of the text?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没关系,我用 CheckTextView 代替
It's ok, I use CheckTextView instead
就像上面答案中提到的@Arutha一样,您可以使用
CheckedTextView
。这可以通过使用内置的 Android 布局来完成(正如我发布的这里) -android.R.layout.simple_list_item_single_choice
:如果你想修改它,你可以将上面的内容复制粘贴到一个新的XML文件中,然后使用
标记将其包含在您的其他布局中(在 下) Apache 2.0 许可证)。您还可以将其用作列表项,并保持不变。Like @Arutha mentioned in the above answer, you can use a
CheckedTextView
. This can be done by using a built-in Android layout (as I posted here) -android.R.layout.simple_list_item_single_choice
:If you want to modify it, you can copy-paste the above into a new XML file, and then use the
<include>
tag to include it in your other layouts (under the Apache 2.0 License). You can also use it as a list item, and leave it unchanged.