[android] #5335 - Invalidate MyLocationView during bearing indicator animation.

This commit is contained in:
Justas Medeisis
2016-06-13 22:16:04 +03:00
committed by Tobrun
parent f470208f6e
commit ce2ccf9c3f

View File

@@ -67,6 +67,14 @@ public class MyLocationView extends View {
private ValueAnimator accuracyAnimator;
private ValueAnimator directionAnimator;
private ValueAnimator.AnimatorUpdateListener invalidateSelfOnUpdateListener =
new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
invalidate();
}
};
private Drawable foregroundDrawable;
private Drawable foregroundBearingDrawable;
private Drawable backgroundDrawable;
@@ -444,6 +452,7 @@ public class MyLocationView extends View {
directionAnimator = ValueAnimator.ofFloat(oldDir, newDir);
directionAnimator.setDuration(375);
directionAnimator.addUpdateListener(invalidateSelfOnUpdateListener);
directionAnimator.start();
}