summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-06-01 15:30:43 -0700
committerAdam Cohen <adamcohen@google.com>2011-06-08 15:21:29 -0700
commitc0dcf597084d00e4c23a7fea5fd0738f6c095a6b (patch)
tree9dcecb4d43b4abc0263d47300536e87a72e33c58 /src/com/android/launcher2/CellLayout.java
parent9578bde6a903925fbda2ecf738c7b00d6fa4026d (diff)
downloadandroid_packages_apps_Trebuchet-c0dcf597084d00e4c23a7fea5fd0738f6c095a6b.tar.gz
android_packages_apps_Trebuchet-c0dcf597084d00e4c23a7fea5fd0738f6c095a6b.tar.bz2
android_packages_apps_Trebuchet-c0dcf597084d00e4c23a7fea5fd0738f6c095a6b.zip
Fixing up some Folder bugs
-> Rendering properly while in spring-loaded mode -> Fixed bug where sometimes the folder's background would vanish -> Fixed bug where the folder background was "stuck" in a fixed location, not following the folder -> Can now add to folders and create folders from spring-loaded mode Change-Id: Ie1c5583a6230a192e6d07763d001b50053daca43
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index eb92d2039..12b0158be 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -16,8 +16,6 @@
package com.android.launcher2;
-import java.util.Arrays;
-
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -49,6 +47,8 @@ import android.view.animation.LayoutAnimationController;
import com.android.launcher.R;
+import java.util.Arrays;
+
public class CellLayout extends ViewGroup {
static final String TAG = "CellLayout";
@@ -1150,12 +1150,12 @@ public class CellLayout extends ViewGroup {
// re-mark space taken by ignoreView as occupied
markCellsAsOccupiedForView(ignoreView);
- // Return null if no suitable location found
- if (bestDistance < Double.MAX_VALUE) {
- return bestXY;
- } else {
- return null;
+ // Return -1, -1 if no suitable location found
+ if (bestDistance == Double.MAX_VALUE) {
+ bestXY[0] = -1;
+ bestXY[1] = -1;
}
+ return bestXY;
}
/**