I'm trying to take a screenshot of a layout that contains several webview using this code.
LinearLayout v = LinLayList.get(0);
v.setBackgroundColor(0xFFFFFFFF);
v.setDrawingCacheEnabled(true);
v.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight());
v.buildDrawingCache(true);
Bitmap b = Bitmap.createBitmap(v.getDrawingCache());
v.setDrawingCacheEnabled(false);
But here's what I'm getting ( layout is above and the screenshot is below ).
While the textviews with "AAAAA!" appear fine in the screenshot, the webview seem to be missing.
Any ideas what might have caused it?
Thanks!