Example usage for android.webkit WebView getDrawingCache

List of usage examples for android.webkit WebView getDrawingCache

Introduction

In this page you can find the example usage for android.webkit WebView getDrawingCache.

Prototype

@Deprecated
public Bitmap getDrawingCache() 

Source Link

Document

Calling this method is equivalent to calling getDrawingCache(false).

Usage

From source file:Main.java

public static Bitmap getBitmapForVisibleRegion(WebView webview) {
    Bitmap returnedBitmap = null;/*from   www .  j av  a  2  s  . co m*/
    webview.setDrawingCacheEnabled(true);
    returnedBitmap = Bitmap.createBitmap(webview.getDrawingCache());
    webview.setDrawingCacheEnabled(false);
    return returnedBitmap;
}