summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java')
-rw-r--r--src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
index 6866c827d..2742bb935 100644
--- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
+++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
@@ -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;