Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.view.View; public class Main { static void changeViewBackgroundColor(final View view, int fromColor, int toColor) { ValueAnimator imageColorChangeAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), fromColor, toColor); imageColorChangeAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animator) { view.setBackgroundColor((Integer) animator.getAnimatedValue()); } }); imageColorChangeAnimation.setDuration(150); imageColorChangeAnimation.start(); } }