diff options
author | Tony Wickham <twickham@google.com> | 2015-11-06 18:11:43 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-06 18:11:43 +0000 |
commit | 94fd1bcf05a3130ede7e74fa33710f40781f7ade (patch) | |
tree | 1d80a7cb785074592c9fb230cafc17965c22d20f /src/com | |
parent | 426b2474fb1d79772fa324768ab57cd8ffdfbbcc (diff) | |
parent | 0f6f2b181fcf28887b343226cef3b263a65621cd (diff) | |
download | android_packages_apps_Trebuchet-94fd1bcf05a3130ede7e74fa33710f40781f7ade.tar.gz android_packages_apps_Trebuchet-94fd1bcf05a3130ede7e74fa33710f40781f7ade.tar.bz2 android_packages_apps_Trebuchet-94fd1bcf05a3130ede7e74fa33710f40781f7ade.zip |
Merge "Stop explicitly snapping to page when navigating with keyboard." into ub-launcher3-burnaby-polish
am: 0f6f2b181f
* commit '0f6f2b181fcf28887b343226cef3b263a65621cd':
Stop explicitly snapping to page when navigating with keyboard.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 9 | ||||
-rw-r--r-- | src/com/android/launcher3/util/FocusLogic.java | 4 |
2 files changed, 4 insertions, 9 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, diff --git a/src/com/android/launcher3/util/FocusLogic.java b/src/com/android/launcher3/util/FocusLogic.java index 7f0da77e4..ba44f008a 100644 --- a/src/com/android/launcher3/util/FocusLogic.java +++ b/src/com/android/launcher3/util/FocusLogic.java @@ -494,9 +494,9 @@ public class FocusLogic { /** * @param edgeColumn the column of the new icon. either {@link #NEXT_PAGE_LEFT_COLUMN} or * {@link #NEXT_PAGE_RIGHT_COLUMN} - * @return the view adjacent to {@param oldView} in the {@param nextPage}. + * @return the view adjacent to {@param oldView} in the {@param nextPage} of the folder. */ - public static View getAdjacentChildInNextPage( + public static View getAdjacentChildInNextFolderPage( ShortcutAndWidgetContainer nextPage, View oldView, int edgeColumn) { final int newRow = ((CellLayout.LayoutParams) oldView.getLayoutParams()).cellY; |