title: Resources$NotFoundException: Resource is not a Drawable
body: <p>I am trying to dynamically set the android:src of a within an tag of a LayerList drawable.</p>
  
  <p>To do so, I need to get access to the tag, but it keeps failing with: </p>
  
  <pre><code>android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x12/d=0x0 a=3 r=0x7f090142}
  </code></pre>
  
  <p>Here is the LayerList drawable portion:</p>
  
  <pre><code>&lt;item android:id="@+id/my_item_id" 
      android:left="35dip" 
      android:right="0dip"
      android:top="0dip"
      android:bottom="50dip"&gt;
      &lt;bitmap android:id="@+id/my_bitmap_id" android:gravity="left"/&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>And here is the code:</p>
  
  <pre><code>Resources r = view.getResources(); 
  Drawable drawable = r.getDrawable(myDrawableId); 
  // it abends on this next line 
  LayerDrawable ld = (LayerDrawable) r.getDrawable(R.id.my_item_id); 
  // this is where I want to set the id of the drawable to use in the bitmap 
  ld.setDrawableByLayerId(myDrawableId, drawable);
  </code></pre>
  
  <p>Any help will be greatly appreciated!</p>