title: Android Development: Checkbox setChecked not working
body: <p>In my xml:</p>
  
  <pre><code>&lt;CheckBox android:id="@+id/checkboxUpdateLessonPlanAll"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/chkLessonPlanAll"
              android:onClick="onCheckboxClicked"/&gt;
  </code></pre>
  
  <p>In my java:</p>
  
  <pre><code>public void onCheckboxClicked(View view) {
      //CheckBox box = (CheckBox) view;
      CheckBox box = (CheckBox) findViewById(R.id.checkboxUpdateLessonPlanAll);
      box.setChecked(!box.isChecked());
      Log.v("qwerty", "checkbox clicked " + box.isChecked() + "!!");
  }
  </code></pre>
  
  <p>I can see my log message in LogCat and it shows it as false when I click on the checkbox but its state doesn't change. It remains unchecked.</p>