I have setOnCheckedChangeListener implemented for my checkbox
Is there a way I can call
checkbox.setChecked(false);
I guess using reflection is the only way. Something like this:
CheckBox cb = (CheckBox) findViewById(R.id.checkBox1);
try {
Field field = CompoundButton.class.getDeclaredField("mChecked");
field.setAccessible(true);
field.set(cb, cb.isChecked());
cb.refreshDrawableState();
cb.invalidate();
} catch (Exception e) {
e.printStackTrace();
}