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(揭露效果)](http://img.readke.com/220827/1941241617-0.gif)
文章图片
揭露动画
推荐阅读
- After Effects 2022(Mac视频特效制作工具 v22.6.0)
- [iOS]|[iOS] 设置毛玻璃效果 (UIBlurEffect)与高斯模糊
- React报错之React Hook 'useEffect' is called in function
- React报错之React|React报错之React Hook useEffect has a missing dependency
- Understanding|Understanding Cause and Effect15
- 工作-React|2022-06-29 工作记录--React-函数式组件 useState的使用 + useEffect的使用 + 监听事件的使用
- 《Effective Java》第54条(返回零长度的数组或者集合,而不是null)
- 《Effective Java》第9条(try-with-resources优先于try-finally)
- React|【React-Hooks基础】入门级详解——useState / useEffect /自定义hook
- 这部9.9分纪录片,揭露武汉人最真实的朋友圈