Sandy
Sandy

Reputation: 6353

Zoom in/out issue in webview in Android

I am displaying the image in webview. By using this:

final String mimeType = "text/html";
        final String encoding = "utf-8";
        String filePath = "file://"+file;
        final String html = "<img width=\"100%\" height=\"100%\" src=\""+filePath+"\" />";
        Log.v("HTML",html);
        webViewe.loadDataWithBaseURL("fake://not/needed", html, mimeType, encoding, "");

When double click on the WebView its zoom the image but when again i double click on it the blank white screen is display. How to resolve it?

Upvotes: 0

Views: 1474

Answers (1)

Blundell
Blundell

Reputation: 76466

Do you mean you need zoom controls:

 webview.getSettings().setBuiltInZoomControls(true);

Upvotes: 1

Related Questions