diff options
| author | 2014-11-04 19:21:23 +0000 | |
|---|---|---|
| committer | 2014-11-04 19:21:23 +0000 | |
| commit | 9433c87b8aca36a4a8fee7de7ccb52c3b705da38 (patch) | |
| tree | 3f32f598744db682254c2ec540e51034a764da37 | |
| parent | e54553c841f3ca1ebcb822e8b9ab6a412e7bd895 (diff) | |
| parent | aa743477137e615ab35b9f6c0d131542cb9c6c41 (diff) | |
am aa743477: am c190e7ee: am af002b35: am 61f91724: Merge "docs: Fix the circularReveal example." into lmp-docs
* commit 'aa743477137e615ab35b9f6c0d131542cb9c6c41':
docs: Fix the circularReveal example.
| -rw-r--r-- | docs/html/training/material/animations.jd | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/html/training/material/animations.jd b/docs/html/training/material/animations.jd index e8291b8301f5..efc0ee3fba2f 100644 --- a/docs/html/training/material/animations.jd +++ b/docs/html/training/material/animations.jd @@ -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> |