Image View
Set Image Url
This function loads an image from a URL into an ImageView
with a placeholder, error image, and optional center crop.
context
: The context to use for Glide.imageUrl
: The URL of the image to load.placeholder?
: Resource ID of the placeholder image.error?
: Resource ID of the error image.isCenterCrop?
: Boolean to determine if the image should be center cropped.
? is nullable
Usage:
This example demonstrates how to use the setImageUrl
extension functions to load images into an ImageView
with different options for placeholders, error images, and center cropping.
Last updated