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.
This commit is contained in:
TreeHugger Robot 2017-07-19 20:25:57 +00:00 committed by Android (Google) Code Review
commit 7c085bf7df
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}