[英]Radio button group in MobileFirst Android
我想在应用程序中放置两个单选按钮(男性和女性)。
我这样做是使用单选按钮(不是组),但是问题是:不能取消选中一个按钮,也可以同时选中这两个按钮
RadioButton组是一组三个按钮,我只需要两个。 有没有办法可以成为两个?
有什么帮助吗?
尝试这个:
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Male"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female"/>
</RadioGroup>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.