hello guys, got this code but it has an error.
any ideas? Thanks.
public void ListenerCheckAll() {
Chbox0 = (CheckBox) findViewById(R.id.checkBox1);
xAllButton = (Button) findViewById(R.id.button1);
xAllButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View vx) {
Chbox0 = (CheckBox) findViewById(R.id.checkBox1);
boolean checked = ((CheckBox) vx).isChecked();
//this part has the error
switch(vx.getId()){
case R.id.CheckBox01:
if (checked){
Toast.makeText(ChTxtMainActivity.this,
"CheckBox1 is checked", Toast.LENGTH_SHORT).show();
edTxt1.setEnabled(false);
break;
}
}
}
});
}