Last active
July 24, 2017 17:48
-
-
Save eufelipe/e634ef3207a573620ead18fbe12089ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class DataBinder { | |
private DataBinder() { | |
} | |
@BindingAdapter("android:src") | |
public static void setImageUrl(final ImageView imageView, String url) { | |
Context context = imageView.getContext(); | |
Picasso.with(context) | |
.load(url) | |
.placeholder(R.mipmap.ic_no_image) | |
.into(imageView); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment