Java tutorial
//package com.java2s; import android.animation.Keyframe; import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.view.View; public class Main { public static ObjectAnimator alphaIn(View view) { PropertyValuesHolder pvhAlpha = PropertyValuesHolder.ofKeyframe(View.ALPHA, Keyframe.ofFloat(0f, 0f), Keyframe.ofFloat(1f, 1f)); return ObjectAnimator.ofPropertyValuesHolder(view, pvhAlpha).setDuration(300); } }