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
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index eb92d20..12b0158 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 com.android.launcher.R;
+import java.util.Arrays;
+
public class CellLayout extends ViewGroup {
static final String TAG = "CellLayout";
@@ -1150,12 +1150,12 @@
// 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;
}
/**