I am using Picasso in my application to load image from a url into an image view. I would like to perform an action, but only once the image has arrived and not when the loading placeholder is visible.
How do I achieve this ?
Thanks!
I am using Picasso in my application to load image from a url into an image view. I would like to perform an action, but only once the image has arrived and not when the loading placeholder is visible.
How do I achieve this ?
Thanks!
you can use picasso's callback as below
Picasso.with(getContext())
.load(url)
.into(imageView, new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
// do something if its loaded successfully
}
@Override
public void onError() {
// do something if its not loaded successfully
}
});
Use Picasso into method with callback and execute your code when onSuccess() is called.