Add image in RecyclerView from api using picasso
-
Add your code, you did so far and we will guide you. – Nakul Dec 15 '16 at 04:59
-
tell me what you have tried and we can guide you from there. – Nithin Dec 15 '16 at 05:12
-
4Step 1 : Google it – Ankur Aggarwal Dec 15 '16 at 05:14
-
Possible duplicate of [Load Image from Picaso](http://stackoverflow.com/questions/40976690/butterfly-animation-on-imageview-android) – Maveňツ Dec 15 '16 at 05:36
6 Answers
Image loading using Picasso is very easy, you can do it like this way Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);
and in their website you can get every details. In your case you can parse every image URL and use RecyclerView
to show them along with Picasso.

- 639
- 8
- 21

- 21,567
- 19
- 47
- 70
Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView)
In the new versions of Picasso you don't need the context anymore. I'm using:
implementation 'com.squareup.picasso:picasso:2.71828'

- 1,795
- 1
- 9
- 15
In the new versions of Picasso used get()
Picasso latest version Picasso library: 2.71828
Picasso
.get()
.load("You Img Path Place Here")
.resize(width, height)
.noFade()
.into("Path set ImageView");
Used latest picasso version
implementation 'com.squareup.picasso:picasso:2.71828'

- 940
- 1
- 9
- 29

- 91
- 1
- 4
Try this
String img_url = "YOUR IMAGE URL";
if (!img_url.equalsIgnoreCase(""))
Picasso.with(context).load(img_url).placeholder(R.drawable.user_image)// Place holder image from drawable folder
.error(R.drawable.user_image).resize(110, 110).centerCrop()
.into("IMAGE VIEW ID WHERE YOU WANT TO SET IMAGE");
Happy coding.

- 1,765
- 3
- 17
- 35
You can load image using picasso like this way
Picasso.with(context).load(android_versions.get(i).getAndroid_image_url()).resize(120, 60).into(viewHolder.img_android);
https://www.learn2crack.com/2016/02/image-loading-recyclerview-picasso.html

- 13,409
- 16
- 61
- 96
Here ctx is context, list.getImage_full_path())
is image coming from server, in placeholder a static image is placed if image is not loaded, on error kent is name of image and into(servicecart_image)
is placed in XML so image is loaded there
Picasso.with(ctx).load(list.getImage_full_path()).resize(160, 200).placeholder(R.drawable.kent)
.error(R.drawable.kent).into(servicecart_image);

- 15,171
- 8
- 38
- 76

- 382
- 4
- 11