title: Change CheckBox Style inside AlertDialog in Android
body: <p>I am having troubles changing the chexbox theme of a Alert Dialog. I am not able to change selected checkbox color to my AccentColor.</p>
  
  <p>this is my style code</p>
  
  <pre><code>&lt;style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert"&gt;      
  &lt;item name="android:checkboxStyle"&gt;@style/CustomCheckBox&lt;/item&gt;
  &lt;/style&gt;
  &lt;style name="CustomCheckBox"     parent="android:style/Widget.CompoundButton.CheckBox"&gt;
  &lt;item name="android:button"&gt;@drawable/activated_checkbox&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Selector : activated_checkbox</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;!-- checked --&gt;
  &lt;item android:state_checked="true" android:drawable="@color/AccentColor"&gt;
  &lt;/item&gt;
  &lt;item android:state_checked="false" android:drawable="@color/White"&gt;
  &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>and method that shows the AlertDialog.</p>
  
  <pre><code>private void showDialog() {
  
      final CharSequence[] items = getResources().getStringArray(R.array.tipoDescargas);
      final boolean[] states = {false, false, false};
      AlertDialog.Builder builder = new AlertDialog.Builder(this,R.style.AlertDialogCustom);
      builder.setTitle(getResources().getString(R.string.preguntaDescargas));
      builder.setMultiChoiceItems(items, states, new DialogInterface.OnMultiChoiceClickListener() {
          public void onClick(DialogInterface dialogInterface, int item, boolean state) {
          }
      });
      builder.setPositiveButton("Descargar", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int id) {
              SparseBooleanArray CheCked = ((AlertDialog) dialog).getListView().getCheckedItemPositions();
              if (CheCked.get(0) &amp;&amp; CheCked.get(1) &amp;&amp; CheCked.get(2))
                  Toast.makeText(getApplication(), "TODOS", Toast.LENGTH_SHORT).show();
              if (CheCked.get(0)) {
                  Toast.makeText(getApplication(), "Item 1", Toast.LENGTH_SHORT).show();
              }
              if (CheCked.get(1)) {
                  Toast.makeText(getApplication(), "Item 2", Toast.LENGTH_SHORT).show();
              }
              if (CheCked.get(2)) {
                  Toast.makeText(getApplication(), "Item 3", Toast.LENGTH_SHORT).show();
              }
          }
      });
      builder.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int id) {
              dialog.cancel();
          }
      });builder.create().show();
  }
  </code></pre>
  
  <p>Can anyone help me? Thank you</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <pre><code>&lt;style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert"&gt;
      &lt;item name="android:checkedTextViewStyle"&gt;@style/CustomCheckBox&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="CustomCheckBox" parent="Theme.AppCompat.Light.Dialog.Alert"&gt;
      &lt;item name="android:checkMark"&gt;@drawable/activated_checkbox&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>I found the solution that display correctly the color.</p>
  
  <pre><code>&lt;style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert"&gt;
      &lt;item name="android:listChoiceIndicatorMultiple"&gt;@drawable/activated_checkbox&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>and Selector</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;item android:drawable="@drawable/checkedcheckbox24"     android:state_checked="true"&gt;&lt;/item&gt;
  &lt;item android:drawable="@drawable/uncheckedcheckbox24"     android:state_checked="false"&gt;&lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>