Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.annotation.TargetApi; import android.os.Build; import android.view.View; import android.view.ViewAnimationUtils; public class Main { @TargetApi(Build.VERSION_CODES.LOLLIPOP) private static Animator createHideAnim(final View viewRoot, int x, int y) { float initialRadius = (float) Math.hypot(viewRoot.getWidth(), viewRoot.getHeight()); Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, x, y, initialRadius, 0); anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); viewRoot.setVisibility(View.GONE); } }); anim.start(); return anim; } }