picasso

onBitmapLoaded of Target object not called on first load

风格不统一 提交于 2019-11-26 01:39:36
问题 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() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { if (bitmap != null) listener.bitmapRetrieved(getBitmapDescriptorInCache(url, bitmap)); else loadDefaultMarker(listener); } @Override public void onBitmapFailed(Drawable

Invalidate cache in Picasso

纵然是瞬间 提交于 2019-11-26 00:28:24
问题 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 invalidate the cache in Picasso? 回答1: In the recent versions of Picasso, there is a new method for invalidate, without any workarounds, so I think that custom PicassoTools class mentioned earlier, is now obsolete in this case Picasso.with(getActivity(

How do I use disk caching in Picasso?

本秂侑毒 提交于 2019-11-26 00:24:58
问题 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); picasso.load(quiz.getImageUrl()).into(quizImage); } I have enable debugging and it always shows either red and green .But never shows yellow Now if i load same image next time and internet is not available the image is not loaded. Questions: Does it not have local disk cache?

Picasso v/s Imageloader v/s Fresco vs Glide [closed]

﹥>﹥吖頭↗ 提交于 2019-11-25 23:08:20
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . Findings: Difference between Picasso v/s ImageLoader here ... Info about the library GLIDE here ... Now recently Facebook released new image library called Fresco Questions: What is the difference between Picasso v/s Imageloader v/s Fresco When can we use Glide Which is the