# compose-android


03/07/2024, 3:52 AM
I have to toggle between displaying 2 AnimatedVectorDrawables. I started running into a weird issue where an artifact from 1 of the AVDs would be superimposed on top of the other AVD when I swapped between the two. Upon some investigation, I found this SO answer which recommended wrapping my painters with a call to
key() { rememberAnimatedVectorPainter(...) }
. This actually didn't initially work, and I actually had to wrap it _twice_: both where to painter was defined and again where it was used (2 separate composables). Finally it works. (you can see my code here) Is it a code smell to use key() like this/does it indicate an issue with how I've created my Composables? Or is it a bug that I should file an issue for?