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

Rafs

12/11/2020, 1:51 PM
Is there anyway to change the fillcolor of a particular pathdata in a vector drawable loaded in compose?
j

John O'Reilly

12/11/2020, 2:00 PM
fwiw I'm using following if this is what you're looking to do?
Copy code
Image(asset = vectorResource(R.drawable.ic_bike),
    colorFilter = ColorFilter.tint(if (station.freeBikes() < 5) lowAvailabilityColor else highAvailabilityColor))
likewise for an
Icon
am using
Copy code
Icon(imageVector = Icons.Filled.Favorite, tint = maroon500)