OSDN Git Service

Cancel animation whenever MotionEvent.ACTION_DOWN is detected
authorHyunyoung Song <hyunyoungs@google.com>
Mon, 27 Jun 2016 18:51:06 +0000 (11:51 -0700)
committerHyunyoung Song <hyunyoungs@google.com>
Mon, 27 Jun 2016 18:51:06 +0000 (11:51 -0700)
Change-Id: I130d05907068ecbec12e09207c7ca2e171e90926

src/com/android/launcher3/allapps/AllAppsTransitionController.java

index 3157c13..536d364 100644 (file)
@@ -97,6 +97,9 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
             } else if (!mLauncher.isAllAppsVisible() && !shouldPossiblyIntercept(ev)) {
                 mNoIntercept = true;
             } else {
+                // This controller is now going to handle all the touch events.
+                // First cancel any animation that is in progress.
+                cancelAnimation();
                 // Now figure out which direction scroll events the controller will start
                 // calling the callbacks.
                 int conditionsToReportScroll = 0;
@@ -162,7 +165,6 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
 
     @Override
     public void onScrollStart(boolean start) {
-        cancelAnimation();
         mCurrentAnimation = LauncherAnimUtils.createAnimatorSet();
         mShiftStart = mAppsView.getTranslationY();
         preparePull(start);