Skip to content

Instantly share code, notes, and snippets.

@Frederikos
Created March 27, 2019 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frederikos/051a2fcab2284b5e46dd9ab4ef036394 to your computer and use it in GitHub Desktop.
Save Frederikos/051a2fcab2284b5e46dd9ab4ef036394 to your computer and use it in GitHub Desktop.
@BindingAdapter({"bind:imageUrl"})
public static void loadImage(ImageView imageView, String imageUrl) {
Glide.with(imageView.getContext())
.load(imageUrl)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.placeholder(R.color.lighter_gray)
.into(imageView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment