code: private void animateOffset(final int offset) {
          if (mTranslationAnimator == null) {
              mTranslationAnimator = ViewCompat.animate(this);
              mTranslationAnimator.setDuration(mRippleAnimationDuration);
              mTranslationAnimator.setInterpolator(INTERPOLATOR);
          } else {
              mTranslationAnimator.cancel();
          }
          mTranslationAnimator.translationY(offset).start();
      }
docs: Internal Method
  <p>
  used to set animation and
  takes care of cancelling current animation
  and sets duration and interpolator for animation
  
  @param offset translation offset that needs to set with animation