PlaylistFragment.java 文件源码

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

项目:Melophile 作者:
@Override
public void showTitle(String title) {
    playlistTitle.setText(title);
    playlistTitle.setScaleX(0);playlistTitle.setScaleY(0);
    titleBackground.post(()->{
        int cx=titleBackground.getWidth()/2;
        int cy=titleBackground.getHeight()/2;
        Animator animator=ViewAnimationUtils.createCircularReveal(titleBackground,cx,cy,0,
                (int)Math.hypot(titleBackground.getWidth(),titleBackground.getHeight()));
        animator.setDuration(400);
        animator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationStart(Animator animation) {
                super.onAnimationStart(animation);
                titleBackground.setVisibility(View.VISIBLE);
                playlistTitle.animate()
                        .setDuration(400)
                        .scaleX(1).scaleY(1)
                        .setInterpolator(new OvershootInterpolator())
                        .start();
            }
        });
        animator.start();
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号