Some drag and drop code refactor:

1) Adding DragOptions to easily extend drap functionality
2) Changing onDragStarted signature to send more information
3) Updating states for dropTargetButton based on drag event directly
4) Removing folder item based on onDragStarted and not startDrag

Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
This commit is contained in:
Sunny Goyal committed 2016-09-01 15:55:13 -07:00
1 parent 61bcfba335
commit 94b510cc68
14 files changed
+224 -173

No files matched your search

@@ -48,6 +48,7 @@ import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.keyboard.FocusedItemDecorator;
@@ -539,7 +540,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
if (!mLauncher.isDraggingEnabled()) return false;
// Start the drag
mLauncher.getWorkspace().beginDragShared(v, this, false);
mLauncher.getWorkspace().beginDragShared(v, this, new DragOptions());
// Enter spring loaded mode
mLauncher.enterSpringLoadedDragMode();