Created
April 15, 2022 14:52
-
-
Save Farhandroid/0473b9a4aadaaf2d302f25a0cd62d8fd to your computer and use it in GitHub Desktop.
BindingAdapter
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
object BindingAdapter { | |
@BindingAdapter("loadImageFromUrl") | |
@JvmStatic | |
fun loadImageFromUrl(imageView: ImageView, imageUrl: String) { | |
imageView.load(imageUrl) { | |
crossfade(600) | |
error(R.drawable.ic_error_placeholder) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment