BitmapFactory.decodeResource returns null value
<p>I am tring to load bitmaps from an internal resource in a View object (the source itself is in "drawable" files).</p>

<p>the code is:</p>

<pre><code>import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;


public class BannerView extends View {



 private Bitmap m_Banner = null;

 public BannerView(Context context, AttributeSet attributeSet) {
  super(context, attributeSet);

  m_Banner = BitmapFactory.decodeResource(getResources(), R.drawable.banner);

 }
}
</code></pre>

<p>Why m_Banner value is null?</p>

<p>thank you in advance</p>

<p>Kobi</p>
