UpdateDialogHandler.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:Pocket-Plays-for-Twitch 作者:
private void circularDismissView(final View view) {
    final int DURATION = 600;

    // Get the center for the FAB
    int cx = (int) view.getX() + view.getMeasuredHeight() / 2;
    int cy = (int) view.getY() + view.getMeasuredWidth() / 2;

    // get the final radius for the clipping circle
    int dx = Math.max(cx, view.getWidth() - cx);
    int dy = Math.max(cy, view.getHeight() - cy);
    float finalRadius = (float) Math.hypot(dx, dy);

    final SupportAnimator dismissAnimation = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius).reverse();
    dismissAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
    dismissAnimation.setDuration(DURATION);
    dismissAnimation.start();
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            mSuperContainer.setVisibility(View.GONE);
        }
    }, DURATION);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号