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
This commit is contained in:
Adam Cohen
2011-06-01 15:30:43 -07:00
parent 9578bde6a9
commit c0dcf59708
14 changed files with 311 additions and 211 deletions

View File

@@ -16,8 +16,6 @@
package com.android.launcher2;
import java.util.ArrayList;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Rect;
@@ -35,7 +33,8 @@ import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import com.android.launcher.R;
import com.android.launcher2.DropTarget.DragObject;
import java.util.ArrayList;
/**
* Class for initiating a drag within a view or across multiple views.
@@ -374,7 +373,7 @@ public class DragController {
public void cancelDrag() {
if (mDragging) {
// Should we also be calling onDragExit() here?
mDragObject.dragSource.onDropCompleted(null, mDragObject.dragInfo, false);
mDragObject.dragSource.onDropCompleted(null, mDragObject, false);
}
endDrag();
}
@@ -572,8 +571,7 @@ public class DragController {
accepted = true;
}
}
mDragObject.dragSource.onDropCompleted((View) dropTarget, mDragObject.dragInfo, accepted);
mDragObject.dragSource.onDropCompleted((View) dropTarget, mDragObject, accepted);
}
private DropTarget findDropTarget(int x, int y, int[] dropCoordinates) {