Fix incorrect accessibility announcement on two panel home

- Divide total pages by panelCount if two panel is active
- Increment target column when moving an item to right panel

Test: manual
Bug: 200009004
Change-Id: Ia8d2d760dc5e8b413e5b1150c049f7fa3ec26513
This commit is contained in:
Andras Kloczl
2022-02-21 16:53:28 +00:00
parent e424f57dcb
commit 2dacbee028
2 changed files with 21 additions and 7 deletions

View File

@@ -3398,7 +3398,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
// When the workspace is not loaded, we do not know how many screen will be bound.
return getContext().getString(R.string.home_screen);
}
return getContext().getString(R.string.workspace_scroll_format, page + 1, nScreens);
int panelCount = getPanelCount();
int currentPage = (page / panelCount) + 1;
int totalPages = nScreens / panelCount + nScreens % panelCount;
return getContext().getString(R.string.workspace_scroll_format, currentPage, totalPages);
}
/**