title: ClipDrawable getDrawable() returns a StateListDrawable
body: <p>I need to access a <a href="http://developer.android.com/reference/android/graphics/drawable/ClipDrawable.html" rel="nofollow"><code>ClipDrawable</code></a> to set the clip level.  Here is the drawable:  </p>
  
  <p><code>@drawable/left_arrow</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item&gt;
      &lt;clip
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:drawable="@drawable/rotated_square"
        android:clipOrientation="horizontal"
        android:gravity="left" /&gt;
    &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><code>@drawable/rotated_square</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item&gt;
      &lt;rotate
        android:fromDegrees="45"
        android:pivotX="50%"
        android:pivotY="50%"
        android:toDegrees="45"&gt;
        &lt;shape
          android:shape="rectangle"&gt;
          &lt;size
            android:width="250dp"
            android:height="250dp"/&gt;
          &lt;solid
            android:color="#ffffff"/&gt;
        &lt;/shape&gt;
      &lt;/rotate&gt;
    &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>When I try to retrieve the drawable <code>left_arrow</code> as a <a href="http://developer.android.com/reference/android/graphics/drawable/ClipDrawable.html" rel="nofollow"><code>ClipDrawable</code></a> like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>ClipDrawable drawable = (ClipDrawable) getResources().getDrawable(R.drawable.left_arrow);
  </code></pre>
  
  <p>I get the following error in LogCat:</p>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.ClipDrawable
          at com.vcapra1.pingpongscoreboard.MainActivity.onCreate(MainActivity.java:89)
  </code></pre>
  
  <p>Why is my <a href="http://developer.android.com/reference/android/graphics/drawable/ClipDrawable.html" rel="nofollow"><code>ClipDrawable</code></a> being returned as a StateListDrawable?</p>