替换后再加载就可以了
html = html.replace("<img","<img style=\"max-width:100%;height:auto\"");
mWebview.loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
替换后再加载就可以了
html = html.replace("<img","<img style=\"max-width:100%;height:auto\"");
mWebview.loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
本文标题:Webview加载图片不适应屏幕的解决
本文链接:https://www.haomeiwen.com/subject/ceoywhtx.html
网友评论