code: public void animateContentViewTranslationY(float y, float alpha,
                                                 Animator.AnimatorListener listener,
                                                 int duration) {
  
          if (DBG) Log.v(TAG, "animateContentViewTranslationY - " +
                         "y=" + y + ", alpha=" + alpha);
  
          mContentView.animate().cancel();
          mContentView.animate()
              .alpha(alpha)
              .translationY(y)
              .setListener(listener)
              .setDuration(duration)
              .start();
      }
docs: Move the contentView to y position with animation.
  
  @param y
  @param alpha
  @param listener
  @param duration