summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 0a3c96dc4..d9d048788 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -1528,8 +1528,8 @@ public class CellLayout extends ViewGroup {
int smallerSize = Math.min(actualWidth, actualHeight);
// Always round up to next largest cell
- int spanX = (width + smallerSize) / smallerSize;
- int spanY = (height + smallerSize) / smallerSize;
+ int spanX = (int) Math.ceil(width / (float) smallerSize);
+ int spanY = (int) Math.ceil(height / (float) smallerSize);
if (result == null) {
return new int[] { spanX, spanY };