Android - webview加载优化

思路:加载时先加载文本,后加载图片调用

WebSettings settings = content.getSettings();
settings.setJavaScriptEnabled(true);
settings.setBlockNetworkImage(true);
settings.setRenderPriority(WebSettings.RenderPriority.HIGH);//设置渲染的优先级
content.setWebChromeClient(new WebChromeClient() {
                @Override
                public void onProgressChanged(WebView view, int newProgress) {
                    if (newProgress == 100) {
                        // 网页加载完成
                        settings.setBlockNetworkImage(false);
                    } else {
                        // 网页加载中
                    }

                }
            });

此处评论已关闭