title: getting Null Pointer Exception in View.getDrawingCache()
body: <p>I am trying to get View converted in bitmap.
  In emulator my program is working fine and running as expected but when I run the same code in Device it gives null pointer Exception at particular line :</p>
  
  <pre><code>Bitmap b = Bitmap.createBitmap(view.getDrawingCache());
  </code></pre>
  
  <p>where view is object of RelativeLayout having Layout of current Activity.
  Can someone guide how can I resolve this issue.
  Thanks.</p>