Android examples for android.view.animation:Animation
Create Circular Reveal Animation
import android.animation.Animator; import android.annotation.TargetApi; import android.os.Build; import android.view.View; import android.view.ViewAnimationUtils; import android.view.animation.AccelerateInterpolator; public class Main { @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Animator attrCreateCircularReveal(View v, int duration) { Animator animator = ViewAnimationUtils.createCircularReveal(v, 0, 0, 0, (float) Math.hypot(v.getWidth(), v.getHeight())); animator.setInterpolator(new AccelerateInterpolator()); animator.setDuration(duration);/*from ww w . j av a 2 s. c om*/ animator.start(); return animator; } }