[2.11.0/1.6.0]bus司机端/乘客端动画调整,bus司机端语音播报调整
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.och.common.module.utils;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
|
||||
/**
|
||||
@@ -14,6 +13,7 @@ public class BlinkAnimationUtil {
|
||||
//实现图片闪烁效果
|
||||
public static void setAnimation(ImageView imageView) {
|
||||
AnimatorSet animationSet = new AnimatorSet();
|
||||
imageView.setTag(imageView.getId(),animationSet);
|
||||
|
||||
ObjectAnimator valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha",0f, 1.0f);
|
||||
ObjectAnimator valueAnimatorDisappare = ObjectAnimator.ofFloat(imageView, "alpha",1.0f, 0f);
|
||||
@@ -25,16 +25,14 @@ public class BlinkAnimationUtil {
|
||||
|
||||
animationSet.playTogether(valueAnimatorDisappare, valueAnimator);
|
||||
animationSet.start();
|
||||
|
||||
}
|
||||
|
||||
//消除动画
|
||||
public static void clearAnimation(ImageView imageView){
|
||||
Animation animation = imageView.getAnimation();
|
||||
if (animation != null){
|
||||
animation.cancel();
|
||||
Object animObject = imageView.getTag(imageView.getId());
|
||||
if (animObject instanceof AnimatorSet){
|
||||
AnimatorSet animatorSet = (AnimatorSet)animObject;
|
||||
animatorSet.cancel();
|
||||
}
|
||||
imageView.clearAnimation();
|
||||
imageView.setAnimation(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user