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...
Asked
Active
Viewed 6,629 times
2

Sephy
- 50,022
- 30
- 123
- 131
2 Answers
6
If you look at the documentation for the loadData()
method you'll see it says:
Content loaded through this mechanism does not have the ability to load content from the network.
Try using the loadDataWithBaseURL()
method instead.

David Webb
- 190,537
- 57
- 313
- 299
-
oh great, slip out of my mind this one. I remember reading this a long time ago lol... thanks – Sephy May 25 '10 at 16:01
-
Actually, it works as fine as the loadData() but still no picture displayed... I don't understand why... – Sephy May 26 '10 at 08:24
0
Perhaps you just need to add
<uses-permission android:name="android.permission.INTERNET" />
to your App Manifest.