Merge "GridView's pageScroll() would be offset by one item."

This commit is contained in:
Romain Guy
2010-08-20 11:40:42 -07:00
committed by Android (Google) Code Review

View File

@@ -1551,9 +1551,9 @@ public class GridView extends AbsListView {
int nextPage = -1;
if (direction == FOCUS_UP) {
nextPage = Math.max(0, mSelectedPosition - getChildCount() - 1);
nextPage = Math.max(0, mSelectedPosition - getChildCount());
} else if (direction == FOCUS_DOWN) {
nextPage = Math.min(mItemCount - 1, mSelectedPosition + getChildCount() - 1);
nextPage = Math.min(mItemCount - 1, mSelectedPosition + getChildCount());
}
if (nextPage >= 0) {