我打算在webview中显示来自SD卡的图像,以便利用他内置的webview的缩放功能。但是,我在使用大于屏幕尺寸的图像(例如1800x1200)来显示适合屏幕的问题(如ImageView中)时遇到了问题。我想要首先完整显示图像,并向用户提供缩放控制。 我已经尝试使用WRAP_CONTENT为webview的宽度和高度,但那不起作用。 任何想法? 以下是我使用的代码片段:在webview中适合图像
String path = getRealPathFromURI(mUriList.get(0)); // this gets the file path
webView = (WebView) findViewById(R.id.WebView01);
WebSettings settings= webView.getSettings();
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
webView.loadUrl("file://" + path);
的可能的复制[灿Android的WebView中自动调整图像巨大?](http://stackoverflow.com/questions/3099344/can-androids-webview-automatically-resize-huge-images) – 2015-12-08 17:25:22