private void animateNavigationBarColor(int color) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (navigationBarColorAnimator != null) navigationBarColorAnimator.cancel();
navigationBarColorAnimator = ValueAnimator
.ofArgb(getWindow().getNavigationBarColor(), color)
.setDuration(ViewUtil.PHONOGRAPH_ANIM_TIME);
navigationBarColorAnimator.setInterpolator(new PathInterpolator(0.4f, 0f, 1f, 1f));
navigationBarColorAnimator.addUpdateListener(animation -> AbsSlidingMusicPanelActivity.super.setNavigationbarColor((Integer) animation.getAnimatedValue()));
navigationBarColorAnimator.start();
}
}
AbsSlidingMusicPanelActivity.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:Phonograph
作者:
评论列表
文章目录