setImageViewToUrl

fun setImageViewToUrl(imageView: ImageView, imageUrl: String, placeholderAspectRatio: Float, card: Card)

Asynchronously fetches the image at the given imageUrl and displays the image in the ImageView. No image will be displayed if the image cannot be downloaded or fetched from the cache.

Parameters

imageView

the ImageView in which to display the image

imageUrl

the URL of the image resource

placeholderAspectRatio

a placeholder aspect ratio that will be used for sizing purposes. The actual dimensions of the final image will dictate the final image aspect ratio.

card