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

Commit 52ff3258 authored by Jon Miranda's avatar Jon Miranda
Browse files

Move padding from Hotseat to Hotseat's CellLayout.

Bug: 63590728
Change-Id: I3ba6ba83b83897d75cc4445a7dab9c5b8b7b8ff1
parent 28032006
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -597,15 +597,18 @@ public class DeviceProfile {
                    ? hotseatBarLeftNavBarRightPaddingPx
                    : hotseatBarRightNavBarRightPaddingPx;

            hotseat.getLayout().setPadding(mInsets.left, mInsets.top, mInsets.right + paddingRight,
            hotseat.getLayout().setPadding(mInsets.left + cellLayoutPaddingLeftRightPx,
                    mInsets.top, mInsets.right + paddingRight + cellLayoutPaddingLeftRightPx,
                    workspacePadding.bottom);
        } else if (isTablet) {
            // Pad the hotseat with the workspace padding calculated above
            lp.gravity = Gravity.BOTTOM;
            lp.width = LayoutParams.MATCH_PARENT;
            lp.height = hotseatBarHeightPx + mInsets.bottom;
            hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left,
                    hotseatBarTopPaddingPx, hotseatAdjustment + workspacePadding.right,
            hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left
                            + cellLayoutPaddingLeftRightPx,
                    hotseatBarTopPaddingPx,
                    hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx,
                    hotseatBarBottomPaddingPx + mInsets.bottom);
        } else {
            // For phones, layout the hotseat without any bottom margin
@@ -613,11 +616,12 @@ public class DeviceProfile {
            lp.gravity = Gravity.BOTTOM;
            lp.width = LayoutParams.MATCH_PARENT;
            lp.height = hotseatBarHeightPx + mInsets.bottom;
            hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left,
                    hotseatBarTopPaddingPx, hotseatAdjustment + workspacePadding.right,
            hotseat.getLayout().setPadding(hotseatAdjustment + workspacePadding.left
                            + cellLayoutPaddingLeftRightPx,
                    hotseatBarTopPaddingPx,
                    hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx,
                    hotseatBarBottomPaddingPx + mInsets.bottom);
        }
        hotseat.setPadding(cellLayoutPaddingLeftRightPx, 0, cellLayoutPaddingLeftRightPx, 0);
        hotseat.setLayoutParams(lp);

        // Layout the page indicators