https://kotlinlang.org logo
#compose
Title
# compose
l

loloof64

02/01/2021, 4:30 PM
Is there a simple way to convert the following (from alpha07) ?
Copy code
Image(asset = vectorResource(id = imageRef), modifier = modifier)
m

Mehdi Haghgoo

02/01/2021, 4:33 PM
Replace asset parameter with vectorAsset.
l

loloof64

02/01/2021, 4:33 PM
Thank you 😃
m

Mehdi Haghgoo

02/01/2021, 4:37 PM
Sorry my bad, replace asset with imageVector.
l

loloof64

02/01/2021, 4:38 PM
No problem thank you 😃
I've tried
Image(imageVector = vectorResource(id = imageRef), cotentDescription = "pieceImage", modifier = modifier)
but my code still does not compile.
There was a typo in cotentDescription : contentDescription
4 Views