Webview加载图片不适应屏幕的解决
2020-04-27 本文已影响0人
GaoXiaoGao
替换后再加载就可以了
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);