From 70c1fb7071fd4f7c6c57e6e87f200dae53c88ed4 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Fri, 29 Jul 2022 17:56:49 +0800 Subject: [PATCH] =?UTF-8?q?[290=20bus=E5=8F=B8=E6=9C=BA=E7=AB=AF]=20?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E5=87=BA=E5=8F=91=E6=8C=89=E9=92=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/och/bus/view/SlidePanelView.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/SlidePanelView.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/SlidePanelView.java index 1433e8e88e..8d4b8046cd 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/SlidePanelView.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/SlidePanelView.java @@ -85,6 +85,7 @@ public class SlidePanelView extends View { private LinearGradient textGradient; private ObjectAnimator matrixAnim; + private ObjectAnimator blockBackanimator; private String blockText = STRING_SLIDE_TO_RIGHT; private Paint.FontMetrics blockTextMetrics = new Paint.FontMetrics(); @@ -239,10 +240,10 @@ public class SlidePanelView extends View { } private void startBlockBackAnim() { - ObjectAnimator animator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0); - animator.setInterpolator(new DecelerateInterpolator()); - animator.setDuration(1000 * blockOffset / getWidth()); - animator.start(); + blockBackanimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0); + blockBackanimator.setInterpolator(new DecelerateInterpolator()); + blockBackanimator.setDuration(1000 * blockOffset / getWidth()); + blockBackanimator.start(); lastX = 0; }