开发者

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?


Do you mean you need zoom controls:

 webview.getSettings().setBuiltInZoomControls(true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜