@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();
});
}
PlaylistFragment.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:Melophile
作者:
评论列表
文章目录