mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
launcher: use scalable grid in 4x4
Many changes are required to make scalable displays work correctly on foldables. This first one is making sure that the correct number of columns is used when calculating the used width for scalable grid. The spaces around the workspace are not final yet. Bug: 191879424 Test: manual Change-Id: Idc41ed004580f1f86d8f9595d005abc72301b1e3
This commit is contained in:
@@ -347,13 +347,13 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
if (panelCount > 1) {
|
||||
if (i % panelCount == leftPanelModulus) {
|
||||
paddingLeft = paddingLeftRight;
|
||||
paddingRight = 0;
|
||||
} else if (i % panelCount == rightPanelModulus) {
|
||||
paddingLeft = 0;
|
||||
paddingRight = grid.cellLayoutBorderSpacingPx / 2;
|
||||
} else if (i % panelCount == rightPanelModulus) { // right side panel
|
||||
paddingLeft = grid.cellLayoutBorderSpacingPx / 2;
|
||||
paddingRight = paddingLeftRight;
|
||||
} else { // middle panel
|
||||
paddingLeft = 0;
|
||||
paddingRight = 0;
|
||||
paddingLeft = grid.cellLayoutBorderSpacingPx / 2;
|
||||
paddingRight = grid.cellLayoutBorderSpacingPx / 2;
|
||||
}
|
||||
}
|
||||
// SparseArrayMap doesn't keep the order
|
||||
|
||||
Reference in New Issue
Block a user