Search code examples
androidcolorsanimatorcircularreveal

How to change createCircularReveal() color?


Like the title said, I'm looking a easy way to customize the color used in reveal.

I want to use official code if it's possible (avoiding 3rd party libraries).

I'm using the usual code:

Animator anim = ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
myView.setVisibility(View.VISIBLE);
anim.start();

Solution

  • The circular reveal animation doesn't have any color. If you want color, you need to set the background color on the view you are providing to circular reveal.