docs: Fix the circularReveal example.

Change-Id: Iac7cab08c179f7f5318ba0e5ed6bad1dd2b29b4e
This commit is contained in:
Ricardo Cervera
2014-10-29 13:26:39 -07:00
parent 0fa6edced7
commit 5f79d17a6b

View File

@@ -84,12 +84,14 @@ int cx = (myView.getLeft() + myView.getRight()) / 2;
int cy = (myView.getTop() + myView.getBottom()) / 2;
// get the final radius for the clipping circle
int finalRadius = myView.getWidth();
int finalRadius = Math.max(myView.getWidth(), myView.getHeight());
// create and start the animator for this view
// (the start radius is zero)
// create the animator for this view (the start radius is zero)
Animator anim =
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
// make the view visible and start the animation
myView.setVisibility(View.VISIBLE);
anim.start();
</pre>