diff options
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index ad4fdc75a..d7f05edcb 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -143,7 +143,8 @@ public class FocusHelper { newParent = getCellLayoutChildrenForIndex(pagedView, pageIndex + 1); if (newParent != null) { pagedView.snapToPage(pageIndex + 1); - child = FocusLogic.getAdjacentChildInNextPage(newParent, v, newIconIndex); + child = FocusLogic.getAdjacentChildInNextFolderPage( + newParent, v, newIconIndex); } break; case FocusLogic.CURRENT_PAGE_FIRST_ITEM: @@ -365,9 +366,7 @@ public class FocusHelper { } int row = ((CellLayout.LayoutParams) v.getLayoutParams()).cellY; parent = getCellLayoutChildrenForIndex(workspace, newPageIndex); - workspace.snapToPage(newPageIndex); if (parent != null) { - workspace.snapToPage(newPageIndex); iconLayout = (CellLayout) parent.getParent(); matrix = FocusLogic.createSparseMatrix(iconLayout, iconLayout.getCountX(), row); @@ -380,17 +379,14 @@ public class FocusHelper { case FocusLogic.PREVIOUS_PAGE_FIRST_ITEM: parent = getCellLayoutChildrenForIndex(workspace, pageIndex - 1); newIcon = parent.getChildAt(0); - workspace.snapToPage(pageIndex - 1); break; case FocusLogic.PREVIOUS_PAGE_LAST_ITEM: parent = getCellLayoutChildrenForIndex(workspace, pageIndex - 1); newIcon = parent.getChildAt(parent.getChildCount() - 1); - workspace.snapToPage(pageIndex - 1); break; case FocusLogic.NEXT_PAGE_FIRST_ITEM: parent = getCellLayoutChildrenForIndex(workspace, pageIndex + 1); newIcon = parent.getChildAt(0); - workspace.snapToPage(pageIndex + 1); break; case FocusLogic.NEXT_PAGE_LEFT_COLUMN: case FocusLogic.PREVIOUS_PAGE_LEFT_COLUMN: @@ -401,7 +397,6 @@ public class FocusHelper { row = ((CellLayout.LayoutParams) v.getLayoutParams()).cellY; parent = getCellLayoutChildrenForIndex(workspace, newPageIndex); if (parent != null) { - workspace.snapToPage(newPageIndex); iconLayout = (CellLayout) parent.getParent(); matrix = FocusLogic.createSparseMatrix(iconLayout, -1, row); newIconIndex = FocusLogic.handleKeyEvent(keyCode, countX + 1, countY, |