How to clear the check boxes when the reset button is clicked


In my project I have a number of checkboxes in a linear layout. When running the project by default all checkboxes are unchecked and I need to check some checkboxes. Below the checkboxes there is a reset button. When the reset button is clicked all the checkboxes are unchecked. How do I do this? Please help.

Call this in onClick()of Reset button.

if (checkBox1.isChecked()) {
if (checkBox2.isChecked()) {

. . . and so on