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
Answering @Jas follow up question as a comment to MrEngineer13's answer (since I don't have enough reputation to comment in any answer), you should use the error()
method prior to registering the Callback
at the into()
method, for example:
Picasso.with(getContext())
.load(url)
.error(R.drawable.error_placeholder_image)
.into(imageView, new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
//Success image already loaded into the view
}
@Override
public void onError() {
//Error placeholder image already loaded into the view, do further handling of this situation here
}
}
);