Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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);
        animator.setEvaluator(new ArgbEvaluator());
        animator.start();
    }
}