Improve feedback during spring loaded mode
- Uniformly scale the outlines of items on the screens to match the correct grid size as closely as possible
- Fix bug with drag + drop that was reporting dragged items' height wrong
- Remove unused code
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index c105c36..de75fd3 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -1245,6 +1245,13 @@
return result;
}
+ public int[] cellSpansToSize(int hSpans, int vSpans) {
+ int[] size = new int[2];
+ size[0] = hSpans * mCellWidth + (hSpans - 1) * mWidthGap;
+ size[1] = vSpans * mCellHeight + (vSpans - 1) * mHeightGap;
+ return size;
+ }
+
/**
* Calculate the grid spans needed to fit given item
*/