I have six chackBoxs so, I need that if user is check the checkBox he is can see button orange that available, but if he not check the button is grey color and not available. so, I try to do that and the problem is, if the user check all the checkBoxs and after not check, the button grey is still available and not change to orange.
this is my code of one checkBox:
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (mCheckBox.isChecked()) {
mImageButtonOrange.setEnabled(true);
mImageButtonOrange.setVisibility(View.VISIBLE);
mImageButtonError.setVisibility(View.GONE);
} else {
mImageButtonOrange.setEnabled(false);
mImageButtonOrange.setVisibility(View.VISIBLE);
mImageButtonError.setVisibility(View.VISIBLE);
}
The checkBox is check, the orange button is available:
so, after we check, we want to unCheck, the button grey is available Although, the checkBoxs is check and the button orange is not availble: enter image description here
so, how I can change this, that after I do unCheck to chackBox and I have another checkBoxs that check, the button orange is Visibility and button grey gone?
thanks for help :).
Aucun commentaire:
Enregistrer un commentaire