Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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