The thing I’m trying is to check all those checkboxes, when "cbkomplet" is checked.
But it doesn’t work.
Here’s the code I have so far.
CheckBox repeatChkBx = ( CheckBox ) findViewById( R.id.cbkomplet );
repeatChkBx.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
if ( isChecked )
{
cbreg.isChecked();
cbtank.isChecked();
cbzoop.isChecked();
cbkom.isChecked();
cbmaske.isChecked();
cbbl.isChecked();
}
}
});
You want to call
setChecked(), notisChecked()on the dependent check boxes. You are simply testing if each of them is checked, then throwing away the result.