ShowroomActivity.java 文件源码

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

项目:showroom-android 作者:
private void hideHelpOverlay() {
    if (animationsInProgress) return;
    animationsInProgress = true;
    titleLayout.bringToFront();
    mainLayout.setVisibility(View.VISIBLE);

    Animator hideAnimation;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        hideAnimation = ViewAnimationUtils.createCircularReveal(helpLayout, titleBtnHelpCenterX, titleBtnHelpCenterY, screenDiagonalPx, 0);
    } else {
        hideAnimation = ObjectAnimator.ofFloat(helpLayout, "alpha", 1f, 0f);
    }

    hideAnimation.setInterpolator(new AccelerateInterpolator());
    hideAnimation.setDuration(250);

    hideAnimation.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            helpLayout.setVisibility(View.GONE);
            animationsInProgress = false;
            helpLayoutShown = false;
            helpLayoutScrollView.scrollTo(0, 0);
        }
    });
    hideAnimation.start();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号