summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Crump <chris@cypheros.co>2019-11-01 10:58:02 +0100
committerBruno Martins <bgcngm@gmail.com>2019-11-03 08:57:35 +0000
commit8bb98420d67a861680a46c69e91c06f7ba296330 (patch)
treedb7517279117bb1c867d27ee190900f1e222cd1d
parenta7bf32efcbda56c9a53129be8c258401aaf5afd5 (diff)
downloadandroid_packages_apps_Trebuchet-8bb98420d67a861680a46c69e91c06f7ba296330.tar.gz
android_packages_apps_Trebuchet-8bb98420d67a861680a46c69e91c06f7ba296330.tar.bz2
android_packages_apps_Trebuchet-8bb98420d67a861680a46c69e91c06f7ba296330.zip
Launcher3: Retrieve the searchbar padding from device profile
Use device profile to get the desired padding Change-Id: I3f6e058fae48ebcde46e223e9ab7546a08877083
-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;