mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Make Talkback anounce which page is the icon being move on." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
578fbee848
@@ -344,7 +344,7 @@
|
||||
<string name="action_move">Move item</string>
|
||||
|
||||
<!-- Accessibility description to move item to empty cell. -->
|
||||
<string name="move_to_empty_cell">Move to row <xliff:g id="number" example="1">%1$s</xliff:g> column <xliff:g id="number" example="1">%2$s</xliff:g></string>
|
||||
<string name="move_to_empty_cell_description">Move to row <xliff:g id="number" example="1">%1$s</xliff:g> column <xliff:g id="number" example="1">%2$s</xliff:g> in <xliff:g id="string" example="Home screen 2 of 4">%3$s</xliff:g></string>
|
||||
|
||||
<!-- Accessibility description to move item inside a folder. -->
|
||||
<string name="move_to_position">Move to position <xliff:g id="number" example="1">%1$s</xliff:g></string>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3418,7 +3418,11 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user