Webview wv=(WebView)findViewById(R.id.webview1);
``String str="<html>
<body>
<img src='file:///android_asset/nag.png' height='300' width='200'/>
</body>
</html>";
wv.loadData(str,"text/html","UTF-8");
答案 0 :(得分:0)
尝试使用此代码
wv.loadDataWithBaseURL("file:///android_asset/", str, "text/html", "UTF-8",null);
而不是
wv.loadData(str,"text/html","UTF-8");