Hello guys, I am having troubles with the animated...
# compose
n
Hello guys, I am having troubles with the animated vectors. When I launch the animation it seems that not every <objectAnimator> are launched and I don't understand why. Here is my code to launch an animated vector resource :
Copy code
val image = animatedVectorResource(id = R.drawable.avd_pathmorph_arrowoverflow_arrow_to_overflow)
val atEnd by remember { mutableStateOf(false) }
Image(
  painter = image.painterFor(atEnd = atEnd),
  contentDescription = null,
)             
LaunchedEffect(Unit) {
  atEnd = !atEnd
}
The drawable comes from here : https://github.com/SmartToolFactory/Animation-Tutorials/blob/master/Tutorial2-1Ani[…]/res/drawable/avd_pathmorph_arrowoverflow_arrow_to_overflow.xml When I run this code, it seems that only the first object animator is done : It moves the point but does not morph to become lines etc. Android Studio Canary's Design window can run the animation correctly but when I run it in my code it fails. Am I launching it correctly ? Do I misunderstand something ?
d
I'm seeing 34 animations being created from parsing the AVD, so the object animators seem to be parsed correctly. Maybe there's a bug in path parsing. Could you file a bug with this AVD included at: https://issuetracker.google.com/issues?q=componentid:612128
n
@Doris Liu Thanks for your response. I have filled an issue in the bug tracker : https://issuetracker.google.com/issues/189963404 (That is the first time I post an issue, so I don't know if I have done it correctly)
👍 1