问题描述
我使用loadData方法将一些html内容加载到webview中,但遇到类似这样的内容时:
< a href =http://www.anywebsite .fr />一些文字< / a>< img src =http://www.anotherwebsite.fr/thewantedpicturewidth =1height =1border =0alt =style =border:none!important; margin:0px!important; />
我只在应用程序中得到这个:
如果我没弄错,这还应该显示图片?
如果有人有任何领导,谢谢......
I use loadData method to load some html content into a webview, but when it encounters something like this :
<a href="http://www.anywebsite.fr/">some text</a><img src="http://www.anotherwebsite.fr/thewantedpicture" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
I only get this in the application :
some text
And if I'm not mistaken, this should also display the picture ?If someone has any lead, thanks...
推荐答案
如果你看一下的文档,你会看到它说:
If you look at the documentation for the loadData()
method you'll see it says:
尝试使用。
Try using the loadDataWithBaseURL()
method instead.
这篇关于android中的webview loaddata不会从img src加载图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!