Factor in CellLayout padding in cell size calculation. am: 8632d9dd1e

Change-Id: I5cf4a8b9ad63ce87efa88708cb4a99439497326c
This commit is contained in:
Jonathan Miranda
2017-07-18 19:41:30 +00:00
+2 -1
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;
}