OSDN Git Service

DO NOT MERGE Fix a bug that could cause flings to last too long using a Scroller
authorAdam Powell <adamp@google.com>
Fri, 23 Jul 2010 22:49:03 +0000 (15:49 -0700)
committerAdam Powell <adamp@google.com>
Thu, 5 Aug 2010 22:50:31 +0000 (15:50 -0700)
Change-Id: Ia176cdb029201dbad193d2d213d3cf6e16fbee63

core/java/android/widget/Scroller.java

index 784a75f..4cb0839 100644 (file)
@@ -218,7 +218,11 @@ public class Scroller  {
                 // Pin to mMinY <= mCurrY <= mMaxY
                 mCurrY = Math.min(mCurrY, mMaxY);
                 mCurrY = Math.max(mCurrY, mMinY);
-                
+
+                if (mCurrX == mFinalX && mCurrY == mFinalY) {
+                    mFinished = true;
+                }
+
                 break;
             }
         }