Code example for ArgbEvaluator

Methods: ofObject

0
		txtHolded.setText("Holded:" + holded + "V");
		// do a animation from red to blue gradiently 
		Integer colorFrom = Color.RED;
		Integer colorTo = Color.BLUE;
		// register and init listener 
		ValueAnimator colorAnimation = ValueAnimator.ofObject(
				new ArgbEvaluator(), colorFrom, colorTo);
		colorAnimation.addUpdateListener(new AnimatorUpdateListener() {
			@Override 
			public void onAnimationUpdate(ValueAnimator animation) {
				txtHolded.setTextColor((Integer) animation.getAnimatedValue());
 
			} 
		}); 
		// animation duration 
		colorAnimation.setDuration(5000);
		// play the animation 
		colorAnimation.start();
	} 
 
	/**