title: Scale Animation on Compound Drawables Android
body: <p>I have a <code>RadioButton</code> with its <code>drawableTop</code> set to a <code>LayerList</code>. That <code>LayerList</code> looks like this</p>
  
  <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid android:color="@color/image_radio_button_bg_selector" /&gt;
              &lt;size
                  android:width="@dimen/imageRadioButtonDrawableSize"
                  android:height="@dimen/imageRadioButtonDrawableSize" /&gt;
              &lt;corners android:radius="@dimen/imageRadioButtonDrawableRadius" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;layer-list&gt;
  </code></pre>
  
  <p>I want to be able to animate this drawable when <code>RadioButton</code> is checked or unchecked. Drawable needs to scale from 50% to 100% when RadioButton is checked and vice versa otherwise. Is there a way to add animations in compound drawable? Specially when drawable is driven by <code>Color Selector</code> and not by <code>Drawable Selector</code>. (<code>image_radio_button_bg_selector</code> in my case)</p>
  
  <p>That color selector looks like this</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:color="?attr/colorAccent" android:state_checked="true" /&gt;
      &lt;item android:color="@android:color/white" android:state_checked="false" /&gt;
      &lt;item android:color="@color/white" /&gt;
  &lt;/selector&gt;
  </code></pre>