summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Folder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Folder.java')
-rw-r--r--src/com/android/launcher2/Folder.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 6856a09eb..c502fb703 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -44,6 +44,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.launcher.R;
+import com.android.launcher2.DropTarget.DragObject;
import com.android.launcher2.FolderInfo.FolderListener;
import java.util.ArrayList;
@@ -619,7 +620,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mReorderAlarm.cancelAlarm();
}
- public void onDropCompleted(View target, DragObject d, boolean success) {
+ public void onDropCompleted(View target, DragObject d, boolean isFlingToDelete,
+ boolean success) {
if (success) {
if (mDeleteFolderOnDropCompleted && !mItemAddedBackToSelfViaIcon) {
replaceFolderWithFinalItem();
@@ -653,10 +655,20 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
updateItemLocationsInDatabase();
}
+ @Override
public boolean supportsFlingToDelete() {
return true;
}
+ public void onFlingToDelete(DragObject d, int x, int y, PointF vec) {
+ // Do nothing
+ }
+
+ @Override
+ public void onFlingToDeleteCompleted() {
+ // Do nothing
+ }
+
private void updateItemLocationsInDatabase() {
ArrayList<View> list = getItemsInReadingOrder();
for (int i = 0; i < list.size(); i++) {
@@ -928,10 +940,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mInfo.add(item);
}
- public void onFlingToDelete(DragObject d, int x, int y, PointF vec) {
- // Do nothing
- }
-
public void onAdd(ShortcutInfo item) {
mItemsInvalidated = true;
// If the item was dropped onto this open folder, we have done the work associated