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/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 932af89..b2a7603 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -16,10 +16,6 @@
package com.android.launcher2;
-import com.android.launcher.R;
-
-import org.xmlpull.v1.XmlPullParser;
-
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -54,7 +50,6 @@
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.View.MeasureSpec;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import android.widget.Checkable;
@@ -62,6 +57,11 @@
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.android.launcher.R;
+import com.android.launcher2.DropTarget.DragObject;
+
+import org.xmlpull.v1.XmlPullParser;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -402,7 +402,7 @@
}
}
- public void onDropCompleted(View target, Object dragInfo, boolean success) {
+ public void onDropCompleted(View target, DragObject d, boolean success) {
final DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
// Create a view, identical to the drag view, that is only used for animating the
@@ -413,7 +413,7 @@
if (success) {
resetCheckedItem(true);
- animateDropOntoScreen(animView, (ItemInfo) dragInfo, DROP_ANIM_DURATION, 0);
+ animateDropOntoScreen(animView, (ItemInfo) d.dragInfo, DROP_ANIM_DURATION, 0);
} else {
// Animate the icon/widget back to its original position
animateIntoPosition(animView, mDragViewOrigin[0], mDragViewOrigin[1], new Runnable() {