summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Crump <chris@cypheros.co>2019-11-01 10:58:02 +0100
committerMichael Bestas <mkbestas@lineageos.org>2019-12-12 15:18:17 +0200
commit975666774f3044220328bc39f0eb7a7dc5d7c53f (patch)
treeb6eb59082cae350cff87d10926449e9ecfb43c56
parent6db7a5e78c2b5a424a3734802b625342bfb02038 (diff)
downloadandroid_packages_apps_Trebuchet-975666774f3044220328bc39f0eb7a7dc5d7c53f.tar.gz
android_packages_apps_Trebuchet-975666774f3044220328bc39f0eb7a7dc5d7c53f.tar.bz2
android_packages_apps_Trebuchet-975666774f3044220328bc39f0eb7a7dc5d7c53f.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;