Use this one simple code ......
Use SharedPreferences
to maintain state of check boxes.
Initialization....
checkBox.setChecked(getSharedPreferences("MyAPP", Context.MODE_PRIVATE).getBoolean("checkBox", true));
OnCheckedChangeListener
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
getSharedPreferences("MyAPP", Context.MODE_PRIVATE).edit().putBoolean("checkBox", isChecked).commit();
}
});
First time all check boxes will be checked and it will be work like you want....
Above code only for one check box. Try same for other check-boxes. Just change unique key for all check boxes like i used here "checkbox" in checkBox.setChecked(getSharedPreferences("MyAPP", Context.MODE_PRIVATE).getBoolean("checkBox", true));
hope your work done by this.....