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
Square lately has updated Target class and now there are more methods to override (onPrepareLoad
and onBitmapFailed
):
Target target = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
}
};
And you still have to use:
Picasso.with(context).load(url).into(target);