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");
Try using this code
wv.loadDataWithBaseURL("file:///android_asset/", str, "text/html", "UTF-8",null);
Instead of
wv.loadData(str,"text/html","UTF-8");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With