CheckBox checkOne = (CheckBox) findViewById(R.id.checkOne);
checkOne.setSelected(true);
CheckBox checkTwo = (CheckBox) findViewById(R.id.checkTwo);
checkTwo.setSele
If the parent LinearLayout contains only the checkboxes, you can do this:
//ll is the LinearLayout holding the children
for(int i = 0; i < ll.getChildCount(); i++) {
((CheckBox)ll.getChildAt(i)).setChecked(true);
}
if you have more views in the LinearLayout you could add a check like this:
for(int i = 0; i < ll.getChildCount(); i++) {
View v = ll.getChildAt(i);
if(v instanceof CheckBox) {
((CheckBox)v).setChecked(true);
}
}