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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -