loadAndResize

suspend fun ImageView.loadAndResize(data: Any?, placeholderDrawable: Drawable?, transformation: StreamImageLoader.ImageTransformation = ImageTransformation.None, onStart: () -> Unit = {}, onComplete: () -> Unit = {})

Loads an image into a drawable and then applies the drawable to the container, resizing it based on the scale types and the given configuration.

Parameters

data

The data to load.

placeholderDrawable

Drawable that's shown while the image is loading.

transformation

The transformation for the image before applying to the target.

onStart

The callback when the load has started.

onComplete

The callback when the load has finished.