I work on the login screen, where basically you can choose whether you want to have a 4-digit PIN access or a secure cleaning method; the way I want it to look is that there are two checkboxes in the layout, initially they are both unchecked. When you select one, it is checked, but if you try to select another, it will automatically turn off the first. I have two checkboxes defined in the layout, but I'm a little confused by the fact that I would have to refer to force the uncheck.
public void onCheckBoxClicked(View view){ boolean checked = ((CheckBox)view).isChecked(); switch(view.getId()){ case R.id.setupCheckBox1: if(checked){ }
Basically, I know that something should go into this if {} is an expression that cancels setupCheckBox2 automatically, but I just don't know what should be made false. Any help appreciated!
In addition, I understand that this is a kind of one-line answer, if someone has good links to checkboxes in Android, I would also like to read about it. I'm a little new to this.
source share