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

Commit 8bb98420 authored by Chris Crump's avatar Chris Crump Committed by Bruno Martins
Browse files

Launcher3: Retrieve the searchbar padding from device profile

Use device profile to get the desired padding

Change-Id: I3f6e058fae48ebcde46e223e9ab7546a08877083
parent a7bf32ef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -122,9 +122,9 @@ public class AppsSearchContainerLayout extends ExtendedEditText
        // Update the width to match the grid padding
        DeviceProfile dp = mActivity.getDeviceProfile();
        int myRequestedWidth = getSize(widthMeasureSpec);
        int rowWidth = myRequestedWidth - mAppsView.getActiveRecyclerView().getPaddingLeft()
                - mAppsView.getActiveRecyclerView().getPaddingRight();

        int leftRightPadding = dp.desiredWorkspaceLeftRightMarginPx
                + dp.cellLayoutPaddingLeftRightPx;
        int rowWidth = myRequestedWidth - leftRightPadding * 2;
        int cellWidth = DeviceProfile.calculateCellWidth(rowWidth, dp.inv.numHotseatIcons);
        int iconVisibleSize = Math.round(ICON_VISIBLE_AREA_FACTOR * dp.iconSizePx);
        int iconPadding = cellWidth - iconVisibleSize;