Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 653ae0a5 authored by Thales Lima's avatar Thales Lima Committed by Android (Google) Code Review
Browse files

Merge "workspace: get the correct page when setting paddings" into sc-v2-dev

parents 992fde6a 41f33c3c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -333,7 +333,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
        int paddingBottom = grid.cellLayoutBottomPaddingPx;

        int panelCount = getPanelCount();
        for (int i = mWorkspaceScreens.size() - 1; i >= 0; i--) {
        int numberOfScreens = mScreenOrder.size();
        for (int i = 0; i < numberOfScreens; i++) {
            int paddingLeft = paddingLeftRight;
            int paddingRight = paddingLeftRight;
            if (panelCount > 1) {
@@ -348,7 +349,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
                    paddingRight = 0;
                }
            }
            mWorkspaceScreens.valueAt(i).setPadding(paddingLeft, 0, paddingRight, paddingBottom);
            // SparseArrayMap doesn't keep the order
            mWorkspaceScreens.get(mScreenOrder.get(i))
                    .setPadding(paddingLeft, 0, paddingRight, paddingBottom);
        }
    }