Reveal|Reveal Effect(揭露效果)

介绍:
【Reveal|Reveal Effect(揭露效果)】揭露动画:就是为了当你在显示或者隐藏一个view的时候为用户提供一个视觉上连续性的动画效果。
使用ViewAnimationUtil工具类可以实现揭露动画
API解释:

ViewAnimationUtils.createCircularReveal( view, //作用在哪个View上面 centerX, centerY,//扩散的中心点 startRadius, //开始扩散初始半径 endRadius)//扩散结束半径

从中心到四周显示
Animator animator = ViewAnimationUtils.createCircularReveal(ivBelle,//作用在哪个View上面 ivBelle.getWidth()/2, ivBelle.getHeight()/2, //扩散的中心点 0,//开始扩散初始半径 ivBelle.getHeight()); //扩散结束半径 animator.setDuration(1000); animator.setInterpolator(new AccelerateInterpolator()); animator.start();

从某一个角到对角
Animator animator = ViewAnimationUtils.createCircularReveal(ivBelle2, 0, 0, 0, (float)Math.hypot(ivBelle2.getWidth(), ivBelle2.getHeight())); animator.setDuration(1000); animator.setInterpolator(new AccelerateInterpolator()); animator.start();

效果图:
Reveal|Reveal Effect(揭露效果)
文章图片
揭露动画

    推荐阅读