Yes we can use the circular reveal effect now on 2.3+
We can achieve this effect by using this Circular Reveal Library.
adding the library dependency
dependencies {
compile ('com.github.ozodrukh:CircularReveal:1.3.1@aar') {
transitive = true;
}
}
Use regular RevealFrameLayout & RevealLinearLayout don't worry, only target will be clipped :)
and in code add
View myView = findView(R.id.awesome_card);
// get the center for the clipping circle
int cx = (myView.getLeft() + myView.getRight()) / 2;
int cy = (myView.getTop() + myView.getBottom()) / 2;
// get the final radius for the clipping circle
int dx = Math.max(cx, myView.getWidth() - cx);
int dy = Math.max(cy, myView.getHeight() - cy);
float finalRadius = (float) Math.hypot(dx, dy);
SupportAnimator animator =
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
animator.setInterpolator(new AccelerateDecelerateInterpolator());
animator.setDuration(1500);
animator.start();