Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; import android.view.View; import android.view.animation.Interpolator; public class Main { public static ObjectAnimator toastAlpha(View view, float alpha, int duration, Interpolator interpolator) { ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "alpha", alpha); objectAnimator.setDuration(duration); objectAnimator.setInterpolator(interpolator); objectAnimator.start(); return objectAnimator; } }