Android揭露效果Reveal Effect
Android大约 590 字示例
代码
public void effect(View view) {
Animator animation = createAnimation(mView);
animation.start();
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public Animator createAnimation(View v) {
Animator animator;
double r = Math.hypot(v.getWidth(), v.getHeight());
animator = ViewAnimationUtils.createCircularReveal(
v,// 操作的视图
0,// 动画开始的中心点X
0,// 动画开始的中心点Y
0,// 动画开始半径
(float) r);// 动画结束半径
animator.setInterpolator(new DecelerateInterpolator());
animator.setDuration(1500);
return animator;
}
阅读 407 · 发布于 2019-04-12
————        END        ————
扫描下方二维码关注公众号和小程序↓↓↓

昵称: