loadImage

fun loadImage(resources: Resources, @RawRes imageId: Int)

Loads the image from imageId in resources. Repeated calls after a successful load are ignored.

Parameters

resources

the app resources used to read the raw image file.

imageId

the raw resource ID of the image to load.