I'm trying to implement animation shown here. It works fine except for unreveal animation, which shows black screen for a moment. The glitch exists not on all devices/api versions. Genymotion emulator of Google Nexus 10 (API 22) does show the glitch.
Unreveal use complex set of animations:
- fade
- layout moving
- CircularReveal with end radius less than start radius
- e.t.c.
I tried to set background
/foreground
/tint
of layouts to @null
/@android:color/transparent
and e.t.c., but it doesn't help at all.
The glitch occurs only with 3 things at once in code:
CircularReveal
layout with itemsCircularReveal
or its child layoutclipChildren=false
on revealing layoutI needed to use
clipChildren
to make effect of movingCircularReveal
circle with stable content which do not move, except for close-button.As I can guess, the problem was with clipping.
CircularReveal
use clipping,clipChildren
use it too, and thenalpha
made it dirty (black). I can't comprehend why it is happening in Android SDK, but I have a solution:disable
clipChildren
(set ittrue
) when you don't need it. I did it on unreveal animation. Result is below:P.S. If you have more specific answer with details on the cause of the glitch, I would gladly mark your answer as correct one.
P.P.S. For anyone, who interested in animation implementation, I shared it here.