Created
May 10, 2018 08:59
-
-
Save aucd29/2d0fdcc2996314fef9a29c46db7fbe3d 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 class ImageBindingAdapter { | |
@BindingAdapter("android:src") | |
public static void imageSrc(@NonNull ImageView view, @DrawableRes int resid) { | |
view.setImageResource(resid); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment