loloof64
10/30/2020, 7:34 PMJohn O'Reilly
10/30/2020, 7:46 PMImage(asset = vectorResource(R.drawable.ic_bike),
colorFilter = ColorFilter.tint(if (station.freeBikes() < 5) lowAvailabilityColor else highAvailabilityColor),
modifier = Modifier.preferredSize(32.dp))
John O'Reilly
10/30/2020, 7:47 PMloloof64
10/30/2020, 7:57 PMloloof64
10/30/2020, 7:59 PMLouis Pullen-Freilich [G]
10/30/2020, 8:00 PMIcon
instead of Image
loloof64
10/30/2020, 8:05 PMAlexjlockwood
10/30/2020, 9:55 PMVectorAsset
objects. i think once you start introducing multi-colored icons into the mix, you’d probably end up having to create some type of wrapper class containing both the vector asset and the tint (i.e. TintableVectorAsset
or something)… that’s my thinking on the subject so far at least…Louis Pullen-Freilich [G]
10/30/2020, 9:58 PMLouis Pullen-Freilich [G]
10/30/2020, 9:58 PMVectorAsset
, but for now it's not that important / requested so we are just leaving it as is