Reveal Animation Example Introduced In Android 5.0

Whenever you show or hide a group of UI elements or any view sometimes it will require some continuation for user’s ease. This is the scenario when reveal animation comes in the picture. Android 5.0, the lollipop version API level 21, introduced ViewAnimationUtils.createCircularReveal() method which returns an Animator which can animate a clipping circle, to animate a clipping circle to reveal or hide a view.

Today I am showing you an example in which you can see the reveal animation effect on clicking a toggle button. Follow the steps below:

Step1 : Create a new android project in your android IDE.

Step2 : Add a image for your image view in drawable folder. I have added the thumbnail image of this post.

Step3 : Write following into your main activity class:

 

 

Step4 : Write following into main xml:

 

 

Step5 : Run for the output as below:

reveal1

reveal2

reveal3

Don’t forget to checkout my previous post on Activity transition.

Leave a Comment: