如何以编程方式在Android中拍摄整个Webview的截图?

如何以编程方式在Android中拍摄整个Webview的截图?,android,android-webview,webpage-screenshot,Android,Android Webview,Webpage Screenshot,我可以拍摄网页上可见内容的截图,但我如何拍摄整个网页的截图 这就是我目前正在做的事情 Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); view.draw(canvas); fos = new FileOutputStream(path); bitmap.compress(Bitm

我可以拍摄网页上可见内容的截图,但我如何拍摄整个网页的截图

这就是我目前正在做的事情

Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
view.draw(canvas);

fos = new FileOutputStream(path);
bitmap.compress(Bitmap.CompressFormat.PNG, 50, fos);
fos.flush();
fos.close()

您提到的解决方案使用capturePicture(),现在已被弃用。您可以试试这个@Mohan没有帮助吗?可能是,这可能会帮助您:--