From fee20911e3ec97af64e4ac2c519d75b5f75e2a27 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Tue, 9 Mar 2010 13:45:21 -0800 Subject: [PATCH] Fix bug with AbsListView position scrolling Change-Id: I91338f0533178417c874325f5f126d1b5fbb5f92 --- core/java/android/widget/AbsListView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index e87455c0870e5..ae4d4099ed8e1 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2773,7 +2773,7 @@ public abstract class AbsListView extends AdapterView implements Te final int lastPos = firstPos + getChildCount() - 1; int viewTravelCount = 0; - if (position < firstPos) { + if (position <= firstPos) { final int boundPosFromLast = lastPos - boundPosition; if (boundPosFromLast < 1) { // Moving would shift our bound position off the screen. Abort. @@ -2789,7 +2789,7 @@ public abstract class AbsListView extends AdapterView implements Te viewTravelCount = posTravel; mMode = MOVE_UP_POS; } - } else if (position > lastPos) { + } else if (position >= lastPos) { final int boundPosFromFirst = boundPosition - firstPos; if (boundPosFromFirst < 1) { // Moving would shift our bound position off the screen. Abort.