How allow download and show images from url

How allow download and show images from url

This manual will show you how to allow and show images from a url path.


I had this problem and I solved in the following way, there is a library called Picasso, I will leave link for install.


Just you have to use this line into your logical for load imagen and the library does the rest.

1.-Include library into dependencies and sync Gradle.


implementation 'com.squareup.picasso:picasso:2.5.2'


2.- Include library


import com.squareup.picasso.Picasso;


Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);

In this example the url is passed like parameter by string and the second parĂ¡meter is a "imageView" object.


Link for Picasso

The disaventages is that you will need internet connetions for it works.



Resources:
http://square.github.io/picasso/

Comments

Popular posts from this blog

Retriving Android API version by code

Add image from URL