Android RadioGroup checks more than one RadioButton?(Android RadioGroup 检查多个 RadioButton?)
问题描述
我正在使用 RadioGroup
,将 RadioButton rdbut
添加到 RadioGroup rdgrp
,如 rdgrp.addView(rdbut)
.
I am using RadioGroup
, added RadioButton rdbut
to RadioGroup rdgrp
like rdgrp.addView(rdbut)
.
上面的代码显示了我如何初始化单选组和单选按钮.在 emulator/mobile 中运行此代码后,我可以一次检查 2 个单选按钮.
the above code shows how I initialize the radiogroup and radio button. after I run the this code, in emulator/mobile , i am able to check 2 radio buttons at a time.
可能是什么问题?
推荐答案
像这样改变你的代码.
这篇关于Android RadioGroup 检查多个 RadioButton?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!