Last active
September 4, 2019 06:52
-
-
Save CristianMG/6cfc08045bf17e976958b372a7a47c9d to your computer and use it in GitHub Desktop.
Image loader from network use
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
// From resource | |
imageLoader.resource { | |
resource { backgroundDrawable } | |
}.loadBackground(actionButton) | |
//From network | |
imageLoader.network { | |
url { FAKE_IMAGE_URL } | |
error { PLACE_HOLDER_ID } | |
placeholder { PLACE_HOLDER_ID } | |
errorCallback { {} } | |
successCallback { { Assert.fail("The image loader must return an error") } } | |
}.load(imageView) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment