title: How to use vector drawable(svg) as button on checkbox and radio button in android
body: <p>I am using vector drawable(svg) files for Checkbox and radio button with custom design. I can't able to set the button on those component. </p>
  
  <pre><code> &lt;CheckBox android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:button="@drawable/checkbox_button_bg"
             android:checked="true"
             android:padding="@dimen/min_padding"
             android:layout_margin="@dimen/min_margin"
             android:text="Do you need recurring" /&gt;
  
   &lt;RadioButton android:id="@+id/rdbtnNever"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="@dimen/most_min_padding"
                android:button="@drawable/radio_button_bg"
                android:text="Never"/&gt;
  </code></pre>
  
  <p>drawable/radio_button_bg.xml</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/radio_btn_select"
      android:state_checked="true"
      android:state_pressed="true" /&gt;
  &lt;item
      android:drawable="@drawable/radio_btn_select"
      android:state_pressed="true" /&gt;
  &lt;item
      android:drawable="@drawable/radio_btn_select"
      android:state_checked="true" /&gt;
  &lt;item
      android:drawable="@drawable/radio_btn_unselect" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>here <strong>radio_btn_select</strong> and <strong>radio_btn_unselect</strong> is vector drawable</p>
  
  <p>And i have done for checkbox as like below.</p>
  
  <p><strong>checkbox_button_bg.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/checkbox_check"
      android:state_checked="true"
      android:state_pressed="true" /&gt;
  &lt;item
      android:drawable="@drawable/checkbox_check"
      android:state_pressed="true" /&gt;
  &lt;item
      android:drawable="@drawable/checkbox_check"
      android:state_checked="true" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>Here checkbox_check is vector drawable when  I run the program, xml inflating exception raised, and which goes off when I remove the android:button line in both component. so, my doubt is, how to use the vector drawable's in these components?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have added following code in app and vector drawable completely working fine for Imageview src adding. with the help of app:srcCompat="@drawable/mic"</p>
  
  <pre><code> defaultConfig {
      minSdkVersion 15
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      vectorDrawables.useSupportLibrary = true
  }
  </code></pre>