Code example for ArgbEvaluator

Methods: ofObject

		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() {
			public void onAnimationUpdate(ValueAnimator animation) {
				txtHolded.setTextColor((Integer) animation.getAnimatedValue());
		// animation duration 
		// play the animation 
Stop searching for code, let great code find you!  Add Codota to your java IDE