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);
我想知道這是可以做到的,當我啓動應用程序,我只能放大,當我回來,我只能從開始縮小尺寸。 這是放大:
這是可以阻止縮小? 我想避免縮小以這個規模: