OnScrollListener fix in AbsListView

Starting from a list at position 0 (first element displayed
at the top), touch and scroll down. The list cannot go further
down and the glow is displayed.

A connecter scrollListener will receive a FLING but will not
receive the IDLE after.

The reason is that the springback motion that should be started
at that point is not started because the overscroll distance is set to 0.

The fix is to report an IDLE state in that case.

Change-Id: I383babaf8412ee74d598efcf61e91cff44068c79
This commit is contained in:
Gilles Debunne
2011-02-25 14:54:11 -08:00
parent 7ad9eb69c4
commit e20a193754

View File

@@ -3508,6 +3508,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
post(this);
} else {
mTouchMode = TOUCH_MODE_REST;
reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
}
}