Bitmap bitmap;
View v1 = l1.getRootView();
v1.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false); 
Doesn't work for me as:
bitmap = Bitmap.createBitmap(v1.getDrawingCache()); 
Is causing a force close.
I'm using a LinearLayout