i am new to android and reading Material Design i am looking for how to design an animation like this animation
Asked
Active
Viewed 1,207 times
0
-
Can you show us the code you've already done? – Thiago Souza Dec 27 '16 at 15:46
-
That's actually talked about in this question. http://stackoverflow.com/questions/30958834/circular-reveal-transition-for-new-activity – DeeV Dec 27 '16 at 15:46
1 Answers
1
This animation is provided on Android API version 21. From the documentation:
The ViewAnimationUtils.createCircularReveal() method enables you to animate a clipping circle to reveal or hide a view.
// previously invisible view
View myView = findViewById(R.id.my_view);
// get the center for the clipping circle
int cx = myView.getWidth() / 2;
int cy = myView.getHeight() / 2;
// get the final radius for the clipping circle
float finalRadius = (float) Math.hypot(cx, cy);
// 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();

Thanos Karpouzis
- 315
- 2
- 6
-
If you care for API < 21 support, you should check out this answer: http://stackoverflow.com/a/28604515/1340659 – Thanos Karpouzis Dec 27 '16 at 15:56
-
-