I\'m playing around with the Picasso library for image loading, but I\'m running into an issue. When an image fails to load, I want to hide the view rather than load in a de
When we got error, error goes to onError method then we handle it!
private void getAvatar(){
Picasso.with(this)
.load(Links.GET_AVATAR + ".jpg")
.into(imgUserAvatar, new Callback() {
@Override
public void onSuccess() {
}
@Override
public void onError() {
imgUserAvatar.setImageResource(R.drawable.icon_profile_default);
}
});
}