How to load image from url into imageview using piccaso - SpartaCode

SpartaCode

Make your development faster and easier !

How to load image from url into imageview using piccaso



Step 1 : Add dependency of library to build.gradle

 compile 'com.squareup.picasso:picasso:2.5.2'

Press Sync button and Synchronize the Project.


Step 2 : Loading image from image Url to ImageView

Just use following code where ever you want to display image.

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

where,

imageview : ImageView object you created in java file.

context : Your app context which can be replaced by ClassName.this(Eg. MainActivity.this)


For more Information visit
http://square.github.io/picasso/

Thank you
Please Like and subscribe







No comments:

Post a Comment

Get Amazing Traffic to your Site

Traffic Exchange

Post Bottom Ad

Responsive Ads Here