Unchecking Radio button in android

情到浓时终转凉″ 提交于 2020-02-02 14:39:28

问题


Hello everyone i am developing an quiz based app in android and i have used the radio buttons as the options it has one quest and 4 options for that and 2 buttons to go back to previous quest and next quest. My quest once opens the app for the 1st time all the radio buttons will be unchecked and after answering the 1st quest say he answers 3rd quest and goes to next quest then the radio button will be in the same 3 rd option(but the option will change) i wanted it all the radio buttons to be unchecked when the user goes to next question every time.Can anyone help me out with this..Thank you in advance


回答1:


clear your radioButtonGroup....

radioButtonGroup.clearCheck();



回答2:


RadioButton extends CompountButton

Which means that you can also use the method setChecked(boolean checked);



来源:https://stackoverflow.com/questions/10768046/unchecking-radio-button-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!