0

When I try to change the source of an animationview to simulate play-stop solution, the source of the animationview is changed successfully, but when I click for the second time, it doesn't play the animation.

Here is my code:

private void AnimationView_OnClick(object sender, EventArgs e)
{
    animationView.Play();
}

and on finish when I try to change the source:

private void AnimationView_OnFinish(object sender, EventArgs e)
{
    if (animationView.Animation == "play_to_pause.json")
        animationView.Animation = "pause_to_play.json";
    else
        animationView.Animation = "play_to_pause.json";
}

What am I doing wrong?

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117

1 Answers1

-1

It will be your json files. I tried to recreate your issue and I had no problem.

Skin
  • 9,085
  • 2
  • 13
  • 29