Last active
May 28, 2020 00:17
-
-
Save mmobin789/0ea8a9441aeccd611f59efde3d51feb0 to your computer and use it in GitHub Desktop.
Shows use-cases for image loading using Pixel library.
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
// Loads an image without a placeholder. | |
Pixel.load("https://example.com/image.jpg", iv) | |
// Loads an image with a placeholder resource. | |
Pixel.load("https://example.com/image.jpg", iv3, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android).build()) | |
// Loads an image of 30x30 pixels with a placeholder resource. | |
Pixel.load("https://example.com/image.jpg", holder.iv, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android) | |
.setImageSize(30, 30).build()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment