Code example for ValueAnimator

Methods: getCurrentPlayTime

0
 
	private AnimatorUpdateListener userAimatorUpdateListener = new AnimatorUpdateListener() {
		@Override 
		public void onAnimationUpdate(ValueAnimator animation) { 
			setLayoutWidth((int) (startWidth + widthDifference 
					* animation.getCurrentPlayTime() / durationTime)); 
		} 
	}; 
 
	private AnimatorListener animatorListener = new AnimatorListener() {
		@Override 
		public void onAnimationStart(Animator animation) { 
			if (userAnimatorListener != null) 
				userAnimatorListener.onAnimationStart(animation); 
		} 
 
		@Override 
		public void onAnimationRepeat(Animator animator) { 
			if (userAnimatorListener != null) 
				userAnimatorListener.onAnimationRepeat(animator); 
		}