diff --git a/res/values/strings.xml b/res/values/strings.xml index 847e4a8625..2addf5034e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -344,7 +344,7 @@ Move item - Move to row %1$s column %2$s + Move to row %1$s column %2$s in %3$s Move to position %1$s diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 300e7bfb11..52dfcd40a9 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -1202,13 +1202,14 @@ public class CellLayout extends ViewGroup { int row = cellY + 1; int col = workspace.mIsRtl ? mCountX - cellX : cellX + 1; int panelCount = workspace.getPanelCount(); + int screenId = workspace.getIdForScreen(this); + int pageIndex = workspace.getPageIndexForScreenId(screenId); if (panelCount > 1) { // Increment the column if the target is on the right side of a two panel home - int screenId = workspace.getIdForScreen(this); - int pageIndex = workspace.getPageIndexForScreenId(screenId); col += (pageIndex % panelCount) * mCountX; } - return getContext().getString(R.string.move_to_empty_cell, row, col); + return getContext().getString(R.string.move_to_empty_cell_description, row, col, + workspace.getPageDescription(pageIndex)); } } diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 4903d7758a..c482ed5698 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -3418,7 +3418,11 @@ public class Workspace extends PagedView return getPageDescription(page); } - private String getPageDescription(int page) { + /** + * @param page page index. + * @return Description of the page at the given page index. + */ + public String getPageDescription(int page) { int nScreens = getChildCount(); int extraScreenId = mScreenOrder.indexOf(EXTRA_EMPTY_SCREEN_ID); if (extraScreenId >= 0 && nScreens > 1) {