4

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();
MiguelHincapieC
  • 5,445
  • 7
  • 41
  • 72

1 Answers1

4

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.

Jin
  • 6,055
  • 2
  • 39
  • 72
  • seem you miss understood the question: the color you are talking about is the one that appears when the reveal's radius is getting bigger. It can be a color, Image, or whatever you want. I'm talking about the color that overlaps the view used in Reveal effect (I'm testing in 2 devices and its white: huawei mate 8 and samsung s3). – MiguelHincapieC Jun 14 '16 at 19:23
  • if you can provide some code to see what you are talking about, it could help a lot. thx – MiguelHincapieC Jun 14 '16 at 19:30
  • Hm, I am unsure what color you are talking about. From my experience circular reveal is essentially a mask that partially shows the provided image until the animation is complete. If there are other colors you want to modify, it would be part of the view/fragment/activity. – Jin Jun 14 '16 at 20:21
  • I will add a gif or image when you can see what color I'm talking about :) – MiguelHincapieC Jun 14 '16 at 20:29
  • until today I realized what I was trying to do and why I couldnt get it: I was trying to do a transition between 2 fragments using reveal effect. – MiguelHincapieC Jun 19 '16 at 20:45
  • 2
    ah, now that's a different story, the colors you want to change is probably the window background color or the target fragment's background color. it's entirely possible, you'll just have to write custom transitions for it. See https://halfthought.wordpress.com/2014/12/10/reveal-challenge/ for some transition inspirations. – Jin Jun 21 '16 at 00:18