Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; import android.view.View; public class Main { public static void alpha(View view, float from, float to, int duration) { ObjectAnimator alpha = ObjectAnimator.ofFloat(view, "alpha", from, to); alpha.setDuration(duration); alpha.start(); } public static void alpha(View view) { alpha(view, 0, 1, 2000); } }