summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-07-19 20:25:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-07-19 20:25:57 +0000
commit5be36b49418504426c74da208d0f87898d993c51 (patch)
treef61681dc6c56cff06f127d44e1075d6d2d0924e6 /src
parent5360b6ee4f3016f38e244607c9ddb835bdfdf2fb (diff)
parent8632d9dd1e69ecdaa6c16fdcb990ce9a85f3f67c (diff)
downloadandroid_packages_apps_Trebuchet-5be36b49418504426c74da208d0f87898d993c51.tar.gz
android_packages_apps_Trebuchet-5be36b49418504426c74da208d0f87898d993c51.tar.bz2
android_packages_apps_Trebuchet-5be36b49418504426c74da208d0f87898d993c51.zip
Merge "Factor in CellLayout padding in cell size calculation." into ub-launcher3-dorval-polish
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index ca5d8e746..2d5f8d016 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -436,7 +436,8 @@ public class DeviceProfile {
// Since we are only concerned with the overall padding, layout direction does
// not matter.
Point padding = getTotalWorkspacePadding();
- result.x = calculateCellWidth(availableWidthPx - padding.x, inv.numColumns);
+ int cellPadding = cellLayoutPaddingLeftRightPx * 2;
+ result.x = calculateCellWidth(availableWidthPx - padding.x - cellPadding, inv.numColumns);
result.y = calculateCellHeight(availableHeightPx - padding.y, inv.numRows);
return result;
}