title: BitmapDrawable cannot decode
body: <p>I'm working to create a health bar for a game and its failing: Thanks in advance!</p>
  
  <pre><code>    //there a corresponding ImageView in the layout
      healthLevel = (ImageView) findViewById(R.id.healthbar);
      BitmapDrawable bitmapDrawable = new BitmapDrawable(getResources(), "res/drawable/health.png");
  
      //vertical bar cropped from top
      clipDrawable = new ClipDrawable(bitmapDrawable, Gravity.BOTTOM, ClipDrawable.VERTICAL);  
      healthLevel.setImageDrawable(clipDrawable);
  
      HelperClass.setHealth();
      clipDrawable.setLevel(10000);
      clipDrawable.invalidateSelf();
  </code></pre>
  
  <p>Log:</p>
  
  <pre><code>11-12 19:32:46.272: W/BitmapDrawable(10524): BitmapDrawable cannot decode res/drawable/health.png
  </code></pre>
  
  <p>Solution:</p>
  
  <pre><code>    //there a corresponding ImageView in the layout
      healthLevel = (ImageView) findViewById(R.id.healthbar);
      Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.health);
  
      //Convert Bitmap to Drawable
      Drawable bitmapDrawable = new BitmapDrawable(getResources(),bmp); 
  
      //vertical bar cropped from top
      clipDrawable = new ClipDrawable(bitmapDrawable, Gravity.BOTTOM, ClipDrawable.VERTICAL);  
      healthLevel.setImageDrawable(clipDrawable);
  
      HelperClass.setHealth();
      clipDrawable.setLevel(10000);
      clipDrawable.invalidateSelf();
  </code></pre>