title: Take proper screenshot
body: <p>I would like to ask help. I want to take screenshot. This is working, but ImageView rounded corners are not rounded on the taken screenshots (and elevation shadows missing too). I used </p>
  
  <p><code>imageView.setClipToOutline(true);</code></p>
  
  <p>to make this work on the phone, but on the screenshots they are rectangular.</p>
  
  <p>These are my screenshot utils:</p>
  
  <p>public class ScreenShotUtils {</p>
  
  <pre><code>public static Bitmap screenShotFromCanvas(View view) {
      Bitmap bitmap = Bitmap.createBitmap(view.getWidth(),
              view.getHeight(), Bitmap.Config.ARGB_8888);
      Canvas canvas = new Canvas(bitmap);
      view.draw(canvas);
      return bitmap;
  }
  
  public static Bitmap screenShotFromDrawingCache(View view) {
      view.setDrawingCacheEnabled(true);
      view.buildDrawingCache();
  
      Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache());
  
      view.destroyDrawingCache();
      view.setDrawingCacheEnabled(false);
  
      return bitmap;
  }
  </code></pre>
  
  <p>Both method has the same result. </p>
  
  <p>However i noticed, that if i turn the hardware acceleration off, the layout looks like the same as on the screenshots.</p>
  
  <p>This is how it looks like after take screenshot:
  <a href="https://i.stack.imgur.com/NlOxo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NlOxo.png" alt="enter image description here"></a></p>
  
  <p>This is how it should be:
  <a href="https://i.stack.imgur.com/LQbLA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LQbLA.jpg" alt="enter image description here"></a></p>