Skip to content

Commit 5703bbf

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Fix a bug in ListView where touch scrolling could skip a data set change" into jb-dev
2 parents 56ce3c0 + 6f663c1 commit 5703bbf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/java/android/widget/AbsListView.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,6 +3179,13 @@ public boolean onTouchEvent(MotionEvent ev) {
31793179
mActivePointerId = ev.getPointerId(pointerIndex);
31803180
}
31813181
final int y = (int) ev.getY(pointerIndex);
3182+
3183+
if (mDataChanged) {
3184+
// Re-sync everything if data has been changed
3185+
// since the scroll operation can query the adapter.
3186+
layoutChildren();
3187+
}
3188+
31823189
switch (mTouchMode) {
31833190
case TOUCH_MODE_DOWN:
31843191
case TOUCH_MODE_TAP:

0 commit comments

Comments
 (0)