summaryrefslogtreecommitdiffstats
path: root/src/com/android
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
commit7c085bf7df645987ef53559c30a0e3f9d06711cb (patch)
tree83ec365b08d267635f17d87af3dcd768b5c35b8f /src/com/android
parent0b5f8f82e3d4bf5664a39aa89b99872227ed6951 (diff)
parentd39707b662602659a929071458bd0a233ec6a0cd (diff)
downloadandroid_packages_apps_Trebuchet-7c085bf7df645987ef53559c30a0e3f9d06711cb.tar.gz
android_packages_apps_Trebuchet-7c085bf7df645987ef53559c30a0e3f9d06711cb.tar.bz2
android_packages_apps_Trebuchet-7c085bf7df645987ef53559c30a0e3f9d06711cb.zip
Merge changes from topic 'am-ad7d3769-753e-4ddd-97fb-2d13b2d07948' into ub-launcher3-dorval-polish2
* changes: Factor in CellLayout padding in cell size calculation. am: 8632d9dd1e Factor in CellLayout padding in cell size calculation.
Diffstat (limited to 'src/com/android')
-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;
}