summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-01-25 22:41:40 -0800
committerMichael Jurka <mikejurka@google.com>2011-01-25 22:42:27 -0800
commitf12c75cb48f87955600c56ccbe0aac84b0c11b28 (patch)
tree43932592576b117bd089f48777740ed345e7ff10 /src/com/android/launcher2/CellLayout.java
parent878aaca1fee925805e4fc210317540bb5ef933ae (diff)
downloadandroid_packages_apps_Trebuchet-f12c75cb48f87955600c56ccbe0aac84b0c11b28.tar.gz
android_packages_apps_Trebuchet-f12c75cb48f87955600c56ccbe0aac84b0c11b28.tar.bz2
android_packages_apps_Trebuchet-f12c75cb48f87955600c56ccbe0aac84b0c11b28.zip
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
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index c105c3624..de75fd344 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -1245,6 +1245,13 @@ public class CellLayout extends ViewGroup {
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
*/