ozodrukh / CircularReveal

Lollipop ViewAnimationUtils.createCircularReveal for everyone 4.0+
MIT License
2.43k stars 391 forks source link

make reveal animation from screen edges #81

Closed LloydBlv closed 7 years ago

LloydBlv commented 8 years ago

Thanks for the great library, I was wondering if there's way to make the reveal animation from all edges of screen to the center point? consider it as a wave coming from four edges of screen closing in the center of screen! thanks again! @ozodrukh

ozodrukh commented 7 years ago

Yeah, create RevealFrameLayout with 4 cards and start all animations same times with different start locations e.g

ViewAnimationUtils.createCircularReveal(yourCard1, left, top, 0, endRadius);
ViewAnimationUtils.createCircularReveal(yourCard2, right, top, 0, endRadius);
ViewAnimationUtils.createCircularReveal(yourCard3, left, bottom, 0, endRadius);
ViewAnimationUtils.createCircularReveal(yourCard4, right, bottom, 0, endRadius);

AnimatorSet reveals = new AnimatorSet();
// ... add those animators and setup AnimatorsSet
reveals.start()