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

Commit 61cfa57a authored by Steven Ng's avatar Steven Ng
Browse files

Correct cell layout spacing in n-panels UI

Test: manual
Fix: 184966000
Change-Id: I6940413c24f41df0b1ffcfd4bec4b0c5c3497b6d
parent 4b878f53
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -325,6 +325,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
            setPageSpacing(Math.max(maxInsets, maxPadding));
        }

        updateWorkspaceScreensPadding();
    }

    private void updateWorkspaceScreensPadding() {
        DeviceProfile grid = mLauncher.getDeviceProfile();
        int paddingLeftRight = grid.cellLayoutPaddingLeftRightPx;
        int paddingBottom = grid.cellLayoutBottomPaddingPx;

@@ -621,10 +626,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
        // created CellLayout.
        CellLayout newScreen = (CellLayout) LayoutInflater.from(getContext()).inflate(
                        R.layout.workspace_screen, this, false /* attachToRoot */);
        DeviceProfile grid = mLauncher.getDeviceProfile();
        int paddingLeftRight = grid.cellLayoutPaddingLeftRightPx;
        int paddingBottom = grid.cellLayoutBottomPaddingPx;
        newScreen.setPadding(paddingLeftRight, 0, paddingLeftRight, paddingBottom);

        mWorkspaceScreens.put(screenId, newScreen);
        mScreenOrder.add(insertIndex, screenId);
@@ -633,6 +634,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
                mLauncher.getStateManager().getState(), newScreen, insertIndex);

        updatePageScrollValues();
        updateWorkspaceScreensPadding();
        return newScreen;
    }