Created
January 28, 2019 09:02
-
-
Save etonotieno/250db5b616f44c8fcd84f21bcc3ee5a6 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
@BindingAdapter("image", "placeholderImage", "errorImage", requireAll=true) | |
fun loadImageForView(view: ImageView, imageUrl: String, errorImage: Drawable, placeholderImage: Drawable) { | |
Picasso.get().load(imageUrl).placeholder(placeholderImage).error(errorImage).into(view) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment