title: Android | Non-stop transition form an animation to an animatorSet
body: <p>I am trying to make an combined animation where a view is first moved (TranslateAnimation) and then hidden/revealed (createCircularReveal Animator)(<a href="http://slides.com/dmytrodanylyk/material-animation#/9/3" rel="nofollow">like here</a>). Rigth now, I am accomplishing it by starting the animator after the animation with the onAnimationEnd callback. But the thing is, it does not start right away but is delayed for like half a second which makes it look less smooth.</p>
  
  <p>Is this even the right aaproach to do this, or is there another way to create such an move + property animation?</p>
  
  <p>Is there may be a way to adjust the onAnimationEnd callback so that it really start rigth away?</p>
  
  <p>EDIT: here my final code:</p>
  
  <pre><code>...
          final Animator circularReveal = ViewAnimationUtils.createCircularReveal(
                  ....
          );
          circularReveal.setDuration(3500);
          circularReveal.setInterpolator(new AnimationUtils().loadInterpolator(YourWorkouts.this,
                  android.R.interpolator.linear_out_slow_in));
          circularReveal.addListener(new AnimatorListenerAdapter() {
              @Override
              public void onAnimationStart(Animator animation) {
                  super.onAnimationStart(animation);
                  createNewWorkoutDialogCardView.setVisibility(View.VISIBLE);
              }
          });
  
          final Animator circularHide = ViewAnimationUtils.createCircularReveal(
                  ...
          );
          circularHide.setDuration(600);
          circularHide.setInterpolator(new AnimationUtils().loadInterpolator(YourWorkouts.this,
                  android.R.interpolator.linear_out_slow_in));
          circularHide.addListener(new AnimatorListenerAdapter() {
              @Override
              public void onAnimationEnd(Animator animation) {
                  super.onAnimationEnd(animation);
                  Log.v("YourWorkouts", "onAnimationEnd: set FAB INVISIBLE");
                  createWorkoutFab.setVisibility(View.GONE);
              }
          });
  
          final AnimatorSet animSet = new AnimatorSet();
          animSet.playTogether(circularHide,circularReveal);
          animSet.setStartDelay(300); // the animator waits only 0.3 seconds 
  
          Integer fabTranslationDistanceX = fabEndPositionX - (createNewWorkoutFABContainer.getLeft() + createNewWorkoutFABContainer.getWidth()/2);
          Integer fabTranslationDistanceY = fabEndPositionY - createWorkoutFab.getHeight()/2  - (createNewWorkoutFABContainer.getTop() + createNewWorkoutFABContainer.getHeight()/2);
          Log.v("YourWorkouts", "xDialogCenter" + fabTranslationDistanceX);
          TranslateAnimation moveFAB = new TranslateAnimation(0, fabTranslationDistanceX, 0, fabTranslationDistanceY);
          moveFAB.setDuration(500); // the translation takes 0.5 seconds
          moveFAB.setFillAfter(true);
          moveFAB.setInterpolator(new AnimationUtils().loadInterpolator(YourWorkouts.this,
                  android.R.interpolator.fast_out_linear_in));
  
          animSet.start(); // start  animator for property animation
          createNewWorkoutFABContainer.startAnimation(moveFAB); // start animation to move view across the screen
  </code></pre>