Created
August 27, 2017 21:16
-
-
Save vsay01/73098cd9e4795c51aa6bd5c425dadd76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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