OSDN Git Service

Fix case when user touches the very edge of a view
authorMindy Pereira <mindyp@google.com>
Wed, 28 Aug 2013 22:00:14 +0000 (15:00 -0700)
committerMindy Pereira <mindyp@google.com>
Wed, 28 Aug 2013 22:00:14 +0000 (15:00 -0700)
This now counts touches at the exact top edge of the view as valid

Change-Id: I9e81a7001632c38d567dde40954e079e7145fa36

core/java/com/android/internal/widget/AutoScrollHelper.java

index f728e6a..6298e35 100644 (file)
@@ -531,7 +531,7 @@ public abstract class AutoScrollHelper implements View.OnTouchListener {
             case EDGE_TYPE_INSIDE:
             case EDGE_TYPE_INSIDE_EXTEND:
                 if (current < leading) {
-                    if (current > 0) {
+                    if (current >= 0) {
                         // Movement up to the edge is scaled.
                         return 1f - current / leading;
                     } else if (mActive && (mEdgeType == EDGE_TYPE_INSIDE_EXTEND)) {