Refactoring FlingToDelete

> Moving all fling related logic to FlingToDeleteHelper from DragController
> Removing fling related methods from DragSource and DropTarget
> Moving fling animation logic from DeleteDropTarget to FlingAnimation
> Simplifying DropTargetBar to directly look for all valid drop targets.
  This makes it easier to add new DropTarget in xml.

Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
This commit is contained in:
Sunny Goyal
2016-12-13 23:39:16 -08:00
parent 466c4131d8
commit 0f76b56865
19 changed files with 227 additions and 327 deletions
+1 -10
View File
@@ -16,12 +16,10 @@
package com.android.launcher3;
import com.android.launcher3.dragndrop.DragView;
import android.graphics.PointF;
import android.graphics.Rect;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.dragndrop.DragView;
/**
* Interface defining an object that can receive a drag.
@@ -116,13 +114,6 @@ public interface DropTarget {
void onDragExit(DragObject dragObject);
/**
* Handle an object being dropped as a result of flinging to delete and will be called in place
* of onDrop(). (This is only called on objects that are set as the DragController's
* fling-to-delete target.
*/
void onFlingToDelete(DragObject dragObject, PointF vec);
/**
* Check if a drop action can occur at, or near, the requested location.
* This will be called just before onDrop.