title: IllegalStateException while adding bitmap to Canvas
body: <p>I was trying to set a bitmap image to a canvas using    <code>setBitMap</code> ,at that time I got an IllegalStateException.This canvas have some images on it currently, I am trying to replace it.
   Any one have any idea why this happened? </p>
  
  <p><strong>Code Snippet</strong> </p>
  
  <pre><code>editBm = Bitmap.createBitmap(951, 552, Bitmap.Config.ARGB_8888);    
          Canvas mCanvas=new Canvas(editBm);
          eBit=LoadBMPsdcard(filePath); ----&gt;returns a bitmap when the file path to the file is provided
          Log.i("BM size", editBm.getWidth()+"");
          mCanvas.setBitmap(eBit);
  </code></pre>
  
  <p>I am not getting any NullPointer errors and the method  <code>LoadBMPsdcard()</code>  is working good.</p>
  
  <p>Please let me know about any ideas you have ...</p>
  
  <p>Thanks in advance</p>
  
  <p>Happy Coding</p>