如何检查是否与QUOT;单选框"被选中? [英] How to check if "Radiobutton" is checked?
本文介绍了如何检查是否与QUOT;单选框"被选中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想作一个结构的条件(if-else语句)单选
I would like to make a structure with the condition (if-else) RadioButton
我想,当单选框的 RB1 的选择,该功能被激活:
I want that when the Radiobutton RB1 is selected, this function is active:
regAuxiliar = ultimoRegistro;
而当单选按钮的 RB2 的选择,该功能被激活:
And when the radiobutton RB2 is selected, this function is active:
regAuxiliar = objRegistro;
和对不起我的英语,我是巴西人。
And sorry for my English, I'm Brazilian.
推荐答案
就像你有一个复选框
RadioButton rb;
rb = (RadioButton) findViewById(R.id.rb);
rb.isChecked();
这篇关于如何检查是否与QUOT;单选框"被选中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文