Is there a similar thing in Android to WPF's Imagebrush?

63 Views Asked by At

I would like to fill each Rect with a small unique image. Is there a best way to do this? Right now they are drawn with using a Paint object.

1

There are 1 best solutions below

0
Pap-lapadon On

I will answer my question for future reference then. Kotlin doesn't have the exact same solution, but you can draw bitmaps into rects similar to this way:

canvas.drawBitmap(image, Rect(0, 0, image!!.width, image!!.height), rect, null)