launcher: correct the amount of padding for preview

The padding on left and right should be added only on the left for left
page and only on the right for right page.

Fixes: 195410512
Test: open Wallpaper & Style and check the space between the pages
Change-Id: Ib27c632d2fb07d4708bd101e555e14e31a26ff9d
This commit is contained in:
Thales Lima 2021-08-13 18:22:26 +01:00
parent d573948424
commit dab1b2922c
1 changed files with 2 additions and 2 deletions

View File

@ -270,13 +270,13 @@ public class LauncherPreviewRenderer extends ContextWrapper
CellLayout leftPanel = mRootView.findViewById(R.id.workspace_left);
leftPanel.setPadding(mDp.workspacePadding.left + mDp.cellLayoutPaddingLeftRightPx,
mDp.workspacePadding.top,
mDp.workspacePadding.right + mDp.cellLayoutPaddingLeftRightPx,
mDp.workspacePadding.right,
mDp.workspacePadding.bottom);
mWorkspaceScreens.put(LEFT_PANEL_ID, leftPanel);
}
CellLayout firstScreen = mRootView.findViewById(R.id.workspace);
firstScreen.setPadding(mDp.workspacePadding.left + mDp.cellLayoutPaddingLeftRightPx,
firstScreen.setPadding(mDp.workspacePadding.left,
mDp.workspacePadding.top,
mDp.workspacePadding.right + mDp.cellLayoutPaddingLeftRightPx,
mDp.workspacePadding.bottom);