android - Is there any way from which we can detect images are loading from cache in picasso? -


as title suggest want check whether images loading cache or not.

i've done couldn't succeeded.

picasso.with(getapplicationcontext())                 .load(data.get(position).get("product_image"))                 .into(viewholder.imgviewicon, new callback() {                      @override                     public void onsuccess() {                         viewholder.imgviewicon.setvisibility(view.visible);                         if (picasso.loadedfrom.network != null)                             yoyo.with(techniques.zoomin).duration(1200)                                     .playon(viewholder.imgviewicon);                         viewholder.placeholder.setvisibility(view.gone);                     }                      @override                     public void onerror() {                      }                 }); 

please have batter option tell me. thanks.

use picasso's setindicatorenabled(true) detect image loaded from.

picasso picasso = picasso.with(context); picasso.setindicatorsenabled(true);  //... picasso.load("http://example.com/image.jpg").into(myimageview); 

enter image description here

a colored ribbon appear in top left corner.

  • red: network
  • yellow: disk
  • green: memory

source: picasso - debug indicators


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -