public void onClick(View view) { if (view instanceof CheckBoxWidget) { CheckBoxWidget checkboxwidget = (CheckBoxWidget) view; boolean flag; flag = !checkboxwidget.isChecked(); checkboxwidget.setChecked(flag); } }
public void onClick(View view) { if (view instanceof CheckBoxWidget) { CheckBoxWidget checkboxwidget = (CheckBoxWidget) view; checkboxwidget.setCheckBox(!checkboxwidget.isChecked()); } }