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.RETRO_MUSIC_ANIM_TIME);
navigationBarColorAnimator.setInterpolator(new PathInterpolator(0.4f, 0f, 1f, 1f));
navigationBarColorAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onAnimationUpdate(ValueAnimator animation) {
AbsSlidingMusicPanelActivity.super.setNavigationbarColor((Integer) animation.getAnimatedValue());
}
});
navigationBarColorAnimator.start();
}
}
AbsSlidingMusicPanelActivity.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:RetroMusicPlayer
作者:
评论列表
文章目录