title: Custom CheckBox image gets cut off
body: <p><img src="https://i.stack.imgur.com/6gL0t.png" alt="CheckBox"></p>
  
  <p>As you can see in the image above. There are three views on this screenshot.<br>
   - The first item is <code>CheckBox</code> with text and having state off.<br>
   - The second item is <code>CheckBox</code> without text and having state on.<br>
   - The last item is <code>ImageView</code> with src pointing to the drawable image.</p>
  
  <p>The CheckBoxes were customized using <code>android:button</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/YliqZ.png" alt="small checkbox"></p>
  
  <p>As I tried using smaller images, all of the checkbox is left-aligned.</p>
  
  <p>Comparing these two images tell me that the default size of the <code>CheckBox</code> seems fixed to certain size until text attribute is large enough to require extending.</p>
  
  <p>There is nothing special in the file as well. See following.</p>
  
  <p><strong>custom_cb.xml</strong></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/creditcard_selected" android:state_checked="true" /&gt;
      &lt;item android:drawable="@drawable/creditcard"/&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>layout.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"&gt;
      &lt;CheckBox android:id="@+id/cbFalse"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:button="@drawable/custom_cb"
                android:text="" /&gt;
      &lt;CheckBox android:id="@+id/cbTrue"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:button="@drawable/custom_cb"
                android:focusable="false"
                android:checked="true"
                android:layout_toRightOf="@id/cbFalse" /&gt;
      &lt;ImageView android:id="@+id/imvTrue"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/creditcard"
                android:layout_toRightOf="@id/cbTrue" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Is there anyway I can use bigger image for CheckBox while keeping the size as <code>wrap_content</code>? If I set CheckBox <code>layout_width</code> to actual pixel or dp then it display full image but that mean I have to manually check for the size every time it change. </p>