0
我有一个webview缩放范围的问题。这是我的代码web视图:webView和缩放范围
WebView web = new WebView(getContext());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setBuiltInZoomControls(true);
String imagePath = id;
String html = "<html><body style='margin:0;padding:0;'><img src=\""+ imagePath + "\" height=\""+ height + "\"width=\""+ width+ "\"></body></html>";
web.loadDataWithBaseURL("file:///mnt/sdcard/DinEgen/", html, "text/html","utf-8","");
web.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
web.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
web.clearView();
web.clearCache(true);
我想知道这是可以做到的,当我启动应用程序,我只能放大,当我回来,我只能从开始缩小尺寸。 这是放大:
这是可以阻止缩小? 我想避免缩小以这个规模: