title: Custom Animation end trigger
body: <p>I'm writing a "space invaders" style app and I needed to do the move stop repeat animation that is classic to the game. I got the processes to go one way, using the code below, however when I want to go back, there does not seem to be an easy way to do this. I think the easiest way to do it is to have something happen on the end animation event, however I cannot get the event to trigger, even when calling <code>super.end();</code>. I've looked around for a way to trigger the event manually but to no avail. The way I am doing this may be a little sketchy but it works well enough right now to try and make it work all the way.</p>
  
  <pre><code>public void start()
  {
      if(begin &lt; end) //recursive end condition
      { 
          int distance = interval + begin; //change the distance to be traveled
          //create new animation to do part of the whole animation
          ObjectAnimator anim = ObjectAnimator.ofFloat(toAnimate, property, begin,distance);
          TimeInterpolator inter = new TimeInterpolator() //makes the animation move with only one frame
          {
              public float getInterpolation(float prog)
              {
                  return Math.round(prog * 10) / 10;
              }
          };
          anim.setInterpolator(inter);
          anim.setDuration((long)(500));
          anim.addListener(new AnimatorListener()
          {
              @Override
              public void onAnimationStart(Animator animation){}
              @Override
              public void onAnimationEnd(Animator animation)
              {
                  start(); //start the next part of the movement
              }
              @Override
              public void onAnimationCancel(Animator animation){}
              @Override
              public void onAnimationRepeat(Animator animation){}
          });
          begin = begin + interval; //update end recursion value
          anim.start(); //begin the animation
      }
      super.end(); //this doesn't work... rip
  }
  </code></pre>