title: How to Screenshot programmatically with custom drawable
body: <p>I'm taking screenshots using the code below.</p>
  
  <p>Inside the layout I am using a custom drawable. The problem is that the bitmap shows everything as expected, except the custom drawable which looks kind of messed up.</p>
  
  <p>I know the problem is related to the drawable. but I don't know what it is.</p>
  
  <p>` View view = app.getCurrentActivity().getWindow().getDecorView().getRootView();</p>
  
  <pre><code>    view.setDrawingCacheEnabled(true);
  
      Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache());
  
      view.setDrawingCacheEnabled(false);`
  </code></pre>
  
  <p>Thank you for your help, Niv</p>