Consider two panel in home to overview transition
- Get the value from DeviceProfile directly Fix: 202444558 Test: manual Change-Id: Ifadbbf34c8103d7275b8b4043dcae47d1168ae83
This commit is contained in:
@@ -813,15 +813,23 @@ public class DeviceProfile {
|
||||
Point padding = getTotalWorkspacePadding();
|
||||
|
||||
int numColumns = isTwoPanels ? inv.numColumns * 2 : inv.numColumns;
|
||||
int cellLayoutTotalPadding =
|
||||
isTwoPanels ? 4 * cellLayoutPaddingLeftRightPx : 2 * cellLayoutPaddingLeftRightPx;
|
||||
int screenWidthPx = availableWidthPx - padding.x - cellLayoutTotalPadding;
|
||||
int screenWidthPx = getWorkspaceWidth(padding);
|
||||
result.x = calculateCellWidth(screenWidthPx, cellLayoutBorderSpacePx.x, numColumns);
|
||||
result.y = calculateCellHeight(availableHeightPx - padding.y
|
||||
- cellLayoutBottomPaddingPx, cellLayoutBorderSpacePx.y, inv.numRows);
|
||||
return result;
|
||||
}
|
||||
|
||||
public int getWorkspaceWidth() {
|
||||
return getWorkspaceWidth(getTotalWorkspacePadding());
|
||||
}
|
||||
|
||||
public int getWorkspaceWidth(Point workspacePadding) {
|
||||
int cellLayoutTotalPadding =
|
||||
isTwoPanels ? 4 * cellLayoutPaddingLeftRightPx : 2 * cellLayoutPaddingLeftRightPx;
|
||||
return availableWidthPx - workspacePadding.x - cellLayoutTotalPadding;
|
||||
}
|
||||
|
||||
public Point getTotalWorkspacePadding() {
|
||||
updateWorkspacePadding();
|
||||
return new Point(workspacePadding.left + workspacePadding.right,
|
||||
|
||||
Reference in New Issue
Block a user