Android examples for android.animation:ObjectAnimator
show Card Background Color Animation via ObjectAnimator
//package com.java2s; import android.animation.ArgbEvaluator; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static void showCardBackgroundColorAnimation(View view, int preColor, int currColor, int duration) { ObjectAnimator animator = ObjectAnimator.ofInt(view, "cardBackgroundColor", new int[] { preColor, currColor }); animator.setDuration(duration);//from www .ja v a 2s .c o m animator.setEvaluator(new ArgbEvaluator()); animator.start(); } }