Reputation: 25
I want to load an image in a TextView
with fromHtml
In the answer to this question a <img src="your_link">
should work in a TextView, but I only get a green square, see image below:
This is the HTML that's loaded:
<!DOCTYPE html>
<html>
<body>
<h1>Image</h1>
<img src="http://hanassets.nd.gov/images/product/test.png">
</body>
</html>
Upvotes: 1
Views: 181
Reputation: 2274
Loading an image with is not possible using fromHtml() method. This method just helps you get the text styling from html
Upvotes: 2
Reputation: 341
It's a long shot, but did you add the permission in the android manifest?
<uses-permission android:name="android.permission.INTERNET" />
Upvotes: 0