private Animator animateListToWidthAtVelocity(float velocity,int width){
  if (mAnimatorSet != null && mAnimatorSet.isRunning()) {
    mAnimatorSet.end();
  }
  ArrayList<Animator> animators=new ArrayList<Animator>();
  for (int i=0; i < mTotalModes; i++) {
    ObjectAnimator animator=ObjectAnimator.ofInt(mModeSelectorItems[i],"visibleWidth",width);
    int duration=(int)(width / velocity);
    animator.setDuration(duration);
    animators.add(animator);
  }
  mAnimatorSet=new AnimatorSet();
  mAnimatorSet.playTogether(animators);
  mAnimatorSet.setInterpolator(null);
  mAnimatorSet.start();
  return mAnimatorSet;
}

private Animator animateListToWidthAtVelocity ( float velocity , int width ) { if ( mAnimatorSet != null && mAnimatorSet . isRunning ( ) ) { mAnimatorSet . end ( ) ; } ArrayList < Animator > animators = new ArrayList < Animator > ( ) ; for ( int i = 0 ; i < mTotalModes ; i ++ ) { ObjectAnimator animator = ObjectAnimator . ofInt ( mModeSelectorItems [ i ] , "visibleWidth" , width ) ; int duration = ( int ) ( width / velocity ) ; animator . setDuration ( duration ) ; animators . add ( animator ) ; } mAnimatorSet = new AnimatorSet ( ) ; mAnimatorSet . playTogether ( animators ) ; mAnimatorSet . setInterpolator ( null ) ; mAnimatorSet . start ( ) ; return mAnimatorSet ; }
animate the mode list to the given width at a constant velocity .
