文字,图片分开加载
1.加载url前,设置图片阻塞
2.加载完毕后,关闭图片阻塞
WebView mWebView = (WebView) findViewById(R.id.webView);
final WebSettings mSettings = mWebView.getSettings();
mSettings.setBlockNetworkImage(true);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
mSettings.setBlockNetworkImage(false);
}
});<pre code_snippet_id="130544" snippet_file_name="blog_20131227_1_8371639" name="code" class="html">mSettings.setSupportZoom(true);
mSettings.setBuiltZoomControls(true);
WebView mWebView = (WebView) findViewById(R.id.webView);
final WebSettings mSettings = mWebView.getSettings();
mSettings.setBlockNetworkImage(true);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
mSettings.setBlockNetworkImage(false);
}
});<pre code_snippet_id="130544" snippet_file_name="blog_20131227_1_8371639" name="code" class="html">mSettings.setSupportZoom(true);
mSettings.setBuiltZoomControls(true);