am 61f91724: Merge "docs: Fix the circularReveal example." into lmp-docs
* commit '61f91724a9375732cd95333921388a3e5a64ac33': docs: Fix the circularReveal example.
This commit is contained in:
@@ -84,12 +84,14 @@ int cx = (myView.getLeft() + myView.getRight()) / 2;
|
|||||||
int cy = (myView.getTop() + myView.getBottom()) / 2;
|
int cy = (myView.getTop() + myView.getBottom()) / 2;
|
||||||
|
|
||||||
// get the final radius for the clipping circle
|
// 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
|
// create the animator for this view (the start radius is zero)
|
||||||
// (the start radius is zero)
|
|
||||||
Animator anim =
|
Animator anim =
|
||||||
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
|
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
|
||||||
|
|
||||||
|
// make the view visible and start the animation
|
||||||
|
myView.setVisibility(View.VISIBLE);
|
||||||
anim.start();
|
anim.start();
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user