OSDN Git Service

Prevent extra animation when scrolling the recycler view.
authorWinson Chung <winsonc@google.com>
Wed, 24 Jun 2015 23:59:31 +0000 (16:59 -0700)
committerWinson Chung <winsonc@google.com>
Wed, 24 Jun 2015 23:59:31 +0000 (16:59 -0700)
Change-Id: I362b557ae63a2cbef77ebf7fac9a7a27adeabb49

src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java

index 96e994b..6ff2ec6 100644 (file)
@@ -169,10 +169,12 @@ public class BaseRecyclerViewFastScrollBar {
                 break;
             case MotionEvent.ACTION_UP:
             case MotionEvent.ACTION_CANCEL:
-                mIsDragging = false;
                 mTouchOffset = 0;
-                mPopup.animateVisibility(false);
-                animateScrollbar(false);
+                if (mIsDragging) {
+                    mIsDragging = false;
+                    mPopup.animateVisibility(false);
+                    animateScrollbar(false);
+                }
                 break;
         }
     }