setImageResource

fun setImageResource(resId: Int, resetMatrices: Boolean = true)

Sets the image to display from a raster drawable resource, decoded by regions.

Parameters

resId

identifier of the drawable resource.

resetMatrices

true to reset transformation matrices, false otherwise.

Throws

if the resource cannot be read or its format is not supported.