public void hide (float positionFromRight, int animationDuration) {
View revealingView = circularRevealViewContainer.getChildAt(0);
int cx = revealingView.getWidth() - (int) (positionFromRight);
int cy = (revealingView.getTop() + revealingView.getBottom()) / 2;
int dx = Math.max(cx, revealingView.getWidth() - cx);
int dy = Math.max(cy, revealingView.getHeight() - cy);
float finalRadius = (float) Math.hypot(dx, dy);
Animator animator;
animator = io.codetail.animation.ViewAnimationUtils
.createCircularReveal(revealingView, cx, cy, finalRadius, 0);
animator.setInterpolator(new AccelerateDecelerateInterpolator());
animator.setDuration(animationDuration);
revealingView.setVisibility(View.GONE);
animator.start();
}
CircularRevealLayout.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:react-native-android-circular-reveal
作者:
评论列表
文章目录