I cannot solve an issue with the getGroupView-method.
the problem is that the listener setOnCheckedChangeListener is getting invoked to many times.
Let say
strong textThere is many way to solved the issue
checkBoxSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// write here your code for example ...
if(isChecked){
// do somtheing when is checked
}else{
// do somthing when is removed the check**strong text**
}
}
});
**and there is another way **
checkBoxSelect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(((CheckBox)v).isChecked()){
//do something
}else{
//do something
}
});