Replace a text with an image

0

I would like to know if it would be possible to replace a piece of text by an image that is made through URL?

I want to replace image 1, image 2 and image 3 with images that are in a JSON array, what's in the JSON array is just the URL of the images.

A print of my apk:

    
asked by anonymous 25.06.2015 / 10:56

1 answer

1

Yes you can do it like this:

URL url = new URL("http://www.site.pt/url_da_imagem");
Bitmap bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
imageView.setImageBitmap(bmp);
    
25.06.2015 / 11:00