Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64d50a67 authored by Romain Guy's avatar Romain Guy
Browse files

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

External issue #10580

Change-Id: Ie1b3ea8e1f7890b480d6ba8ff423024a5c4cd047
parent 0dc4d15c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {