I use the code below to draw a view on to a bitmap/canvas.
Bitmap bitmap = Bitmap.createBitmap(
viewGroup.getWidth (), viewGroup.getHeight (), Bitmap.Config.ARGB_8888);
viewGroup.draw(new Canvas(bitmap));
It works great, with one small problem: it doesn't draw elevation shadows. I assume that the shadows aren't drawn in the draw method. So where are they drawn and how can I transfer them to my canvas?