Hi folks, I getting a unexpected behavior using Ic...
# compose
s
Hi folks, I getting a unexpected behavior using Icon, the previous vector is being kept in the screen.
m
Yes. I got this bug too, but forgot to file a bug report...
m
z
Oh I think I hit this too, thanks for filing!
👍 2
n
Thanks for filing. Yes this is a known issue. As a workaround give the different vector drawable xml assets different name properties. The current logic right now is overly aggressive about caching if we think the contents are the same.
m
Or move the
if
statement so the entire
Icon
changes, not only asset inside of it:
if (value) Icon(vectorResource(R.drawable.ic_add)) else Icon(vectorResource(R.drawable.ic_brightness_5))