public void animateContentViewTranslationX ( float x , float alpha , Animator . AnimatorListener listener , int duration ) { if ( DBG ) Log . v ( TAG , "animateContentViewTranslationX - " + "x=" + x + ", alpha=" + alpha ) ; mContentView . animate ( ) . cancel ( ) ; mContentView . animate ( ) . alpha ( alpha ) . translationX ( x ) . setListener ( listener ) . setDuration ( duration ) . start ( ) ; }
Move the contentView to x position with animation .