diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-07-19 20:25:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-07-19 20:25:57 +0000 |
commit | 7c085bf7df645987ef53559c30a0e3f9d06711cb (patch) | |
tree | 83ec365b08d267635f17d87af3dcd768b5c35b8f /src/com/android/launcher3 | |
parent | 0b5f8f82e3d4bf5664a39aa89b99872227ed6951 (diff) | |
parent | d39707b662602659a929071458bd0a233ec6a0cd (diff) | |
download | android_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/launcher3')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 3 |
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; } |