I have a code to take snapshot of WebView and it works perfectly on pre-L versions:
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
float changeSizeCoefficient = calculateChangeCoef(displayMetrics);
int sizeTo = (int) (238f * displayMetrics.density * changeSizeCoefficient);
int height = webView.getWidth() > webView.getContentHeight() ? webView.getContentHeight() : webView.getWidth();
Bitmap snapshot = Bitmap.createBitmap(webView.getWidth(), height, Bitmap.Config.ARGB_8888);
Canvas bitmapCanvas = new Canvas(snapshot);
webView.draw(bitmapCanvas);
Bitmap resizedSnapshot = Bitmap.createScaledBitmap(snapshot, sizeTo, sizeTo, false);
if (!resizedSnapshot.equals(snapshot))
snapshot.recycle();
return resizedSnapshot;
But on 5.0+ versions the invisible part of WebView on snapshot is filled with white color.
How can i take snapshot of all WebView on Android 5.0+?