Skip to content

Instantly share code, notes, and snippets.

@vsay01
Created August 27, 2017 21:16
Show Gist options
  • Select an option

  • Save vsay01/73098cd9e4795c51aa6bd5c425dadd76 to your computer and use it in GitHub Desktop.

Select an option

Save vsay01/73098cd9e4795c51aa6bd5c425dadd76 to your computer and use it in GitHub Desktop.
public class ImageBinder {
private ImageBinder() {
//NO-OP
}
@BindingAdapter({"imageURL"})
public static void loadImage(ImageView view, String imageUrl) {
Picasso.with(view.getContext())
.load(imageUrl)
.error(R.drawable.placeholder_nomoon)
.placeholder(R.drawable.placeholder_nomoon)
.into(view);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment