title: Android: Any idea why cannot load drawable object?
body: <p>There are several custom-made graphic objects (.png files) included in the project inside res/drawable map.</p>
  
  <p>All elements are normally loaded and displayed in the user interface except two icons and so far haven't figured out what causes the problem.</p>
  
  <p>The code which doesn't affect the user interface as it should is the following:</p>
  
  <pre><code>if (settings.isMute()) {
          muteIcon.setIconImage(R.drawable.ic_volume_off_small);
      } else {
          muteIcon.setIconImage(R.drawable.ic_volume_small);
      }
  </code></pre>
  
  <p>In both cases there is only <code>ic_volume_small</code> displayed on the screen and the Variables window in the IDE displays the following:</p>
  
  <blockquote>
    <p>R.drawable.ic_volume_small = Class not
    loaded : net.client.android.R$drawable
    R.drawable.ic_volume_of_small = Class
    not loaded :
    net.client.android.R$drawable</p>
  </blockquote>
  
  <p>The method (member of IconImage class) which should change the icon image is the following:</p>
  
  <pre><code>public void setIconImage(int imageFromResources) {
      iconImage = BitmapFactory.decodeResource(getResources(), imageFromResources);
      iconWidth = iconImage.getWidth();
      iconHeight = iconImage.getHeight();
      invalidate();
  
  }
  </code></pre>
  
  <p>Does anyone know what could cause the described problem?</p>
  
  <p>Thanks!</p>