Android RadioButton allow more than one to be check

霸气de小男生 提交于 2019-12-02 09:11:29

RadioGroups are designed to only allow 1 selection. It's confusing for users to have what is basically checkbox-like behaviour when they are using a RadioGroup.

If you really need to do this, you either need to use multiple RadioGroup objects, or use checkboxes instead.

Android Checkbox documentation is here: http://developer.android.com/reference/android/widget/CheckBox.html

You can attach listeners to the checkbox objects by using the following:

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