Questions tagged [picasso]

Picasso is an open source powerful and dynamic image caching and downloading library by Square.

Working with bitmaps can be hard on Android apps. There are too many things that can go wrong. The golden rule is decode only as much as you need, never more. Picasso is the realization of this rule by Square.

With automatic canceling, transformations and a fluent API, Picasso provides a super fast, elegant solution for downloading, caching and displaying images to your Android app.

Official Site: http://square.github.io/picasso/

2541 questions
367
votes
6 answers

Picasso v/s Imageloader v/s Fresco vs Glide vs Coil

Findings: Difference between Picasso v/s ImageLoader here ... Info about the library GLIDE here ... Facebook has its own library Fresco Newest addition to the list Coil Questions: What is the difference between Picasso v/s Imageloader v/s Fresco…
Devrath
  • 42,072
  • 54
  • 195
  • 297
207
votes
13 answers

How to get a context in a recycler view adapter

I'm trying to use picasso library to be able to load url to imageView, but I'm not able to get the context to use the picasso library correctly. public class FeedAdapter extends RecyclerView.Adapter { private List
Stranger B.
  • 9,004
  • 21
  • 71
  • 108
168
votes
2 answers

Resize image to full width and fixed height with Picasso

I have a vertical LinearLayout where one of the items is an ImageView loaded using Picasso. I need to rise the image's width to the full device width, and to display the center part of the image cropped by a fixed height (150dp). I currently have…
David Rabinowitz
  • 29,904
  • 14
  • 93
  • 125
136
votes
8 answers

onBitmapLoaded of Target object not called on first load

In my function : public void getPointMarkerFromUrl(final String url, final OnBitmapDescriptorRetrievedListener listener) { final int maxSize = context.getResources().getDimensionPixelSize(R.dimen.icon_max_size); Target t = new Target() { …
psv
  • 3,147
  • 5
  • 32
  • 67
127
votes
9 answers

How do I use disk caching in Picasso?

I am using Picasso to display image in my android app: /** * load image.This is within a activity so this context is activity */ public void loadImage (){ Picasso picasso = Picasso.with(this); picasso.setDebugging(true); …
user93796
  • 18,749
  • 31
  • 94
  • 150
116
votes
12 answers

Animated loading image in picasso

I have the following code to load an image in Picasso, using a drawable for the placeholder to display while the image is downloading. What I want though is an animated spinning progress bar style spinner that animates around and around while the…
NZJames
  • 4,963
  • 15
  • 50
  • 100
113
votes
10 answers

android: create circular image with picasso

The question had been asked and there had been a promise made for the very version of Picasso that I am using: How do I send a circular bitmap to an ImageView using Picasso? I am new to Picasso and only thing I have used is…
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199
96
votes
7 answers

How to listen for Picasso (Android) load complete events?

Is there a way to listen for events from Picasso when using the builder like: Picasso.with(getContext()).load(url).into(imageView); I'm trying to call requestLayout() and invalidate() on the parent GridView so it'll resize properly but I don't know…
Keith
  • 4,144
  • 7
  • 25
  • 43
91
votes
5 answers

Local image caching solution for Android: Square Picasso, Universal Image Loader, Glide, Fresco?

I am looking for an asynchronous image loading and caching library in Android. I was going to use Picasso, but I found Universal Image Loader is more popular on GitHub. Does anyone know about these two libraries? A summary of pros and cons would be…
X.Y.
  • 13,726
  • 10
  • 50
  • 63
90
votes
13 answers

Resize image to full width and variable height with Picasso

I have a listView with an adapter that contains ImageView of variable size (width and height). I need resize the pictures load with Picasso to the max width of layout and a variable height given by the aspect ratio of the picture. I have checked…
wendigo
  • 1,973
  • 2
  • 17
  • 21
88
votes
4 answers

Use Picasso to get a callback with a Bitmap

I'm using Picasso to download images for my app. I'm in a situation where I need to access the Bitmap first before it's loaded into the ImageView. The presence of the Downloader.Response class seems to suggest this is possible, but I can't find any…
Steve M
  • 9,296
  • 11
  • 49
  • 98
80
votes
7 answers

Picasso Load image from filesystem

Can I use Picasso library to load images from the filesystem? I'm using startActivityForResult to let the user pick a photo from his gallery, and then want to show the selected image. I already have working code to get the image filesystem Uri, but…
edrian
  • 4,501
  • 5
  • 31
  • 35
77
votes
14 answers

Invalidate cache in Picasso

I load an image from disk using Picasso, e.g., Picasso.with(ctx).load(new File("/path/to/image")).into(imageView), but whenever I save a new image in that file, and refresh my ImageView, Picasso still has the bitmap cached. Is it possible to…
Maarten
  • 6,894
  • 7
  • 55
  • 90
76
votes
13 answers

cannot find symbol method with() using picasso library android

i'm getting one issue in android app, I am trying to check already existing app, the app contains implementation('com.squareup.picasso:picasso:3.0.0-SNAPSHOT') { exclude group: 'com.android.support' } picasso library and using that…
Afsara
  • 1,411
  • 3
  • 13
  • 31
58
votes
9 answers

Recyclerview painfully slow to load cached images form Picasso

I have implemented a RecyclerView that contains mainly images which is loading in through Picasso. My problem is that as soon as I scroll down or up the view, the placeholder image appears for approx. a second before it is replaced by the actual…
1
2 3
99 100