summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-02-17 02:03:05 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-17 02:03:05 +0000
commit775d4c9ac0544c8ba95e9a7817bccc0c63508bcd (patch)
tree6125bb24684e8f18e8abb778be38c0147b407a6a /src/com/android/launcher3/DeviceProfile.java
parentfce9c411ac7fecc5c97fb3e807cf3014bccf7573 (diff)
parent5df98da8fd2c1997bd6c09a4772f018730345090 (diff)
downloadandroid_packages_apps_Trebuchet-775d4c9ac0544c8ba95e9a7817bccc0c63508bcd.tar.gz
android_packages_apps_Trebuchet-775d4c9ac0544c8ba95e9a7817bccc0c63508bcd.tar.bz2
android_packages_apps_Trebuchet-775d4c9ac0544c8ba95e9a7817bccc0c63508bcd.zip
Merge "Setting content bounds in onMeasure as it uses measuredWidth, which might not be available during onCreate" into ub-launcher3-burnaby-polish
am: 5df98da8fd * commit '5df98da8fd2c1997bd6c09a4772f018730345090': Setting content bounds in onMeasure as it uses measuredWidth, which might not be available during onCreate
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index cd5823084..b67e07b33 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -273,7 +273,7 @@ public class DeviceProfile {
int allAppsCellWidthGap =
res.getDimensionPixelSize(R.dimen.all_apps_icon_width_gap);
int availableAppsWidthPx = (recyclerViewWidth > 0) ? recyclerViewWidth : availableWidthPx;
- int numAppsCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
+ int numAppsCols = (availableAppsWidthPx + allAppsCellWidthGap - appsViewLeftMarginPx) /
(allAppsIconSizePx + allAppsCellWidthGap);
int numPredictiveAppCols = Math.max(inv.minAllAppsPredictionColumns, numAppsCols);
allAppsNumCols = numAppsCols;