Removing some methods from the DragSource

This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
This commit is contained in:
Sunny Goyal
2017-10-03 16:17:32 -07:00
parent 3792096688
commit 1ce9c476f7
12 changed files with 21 additions and 123 deletions

View File

@@ -290,24 +290,12 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
dragController.removeDragListener(this);
}
});
mLauncher.getWorkspace().beginDragShared(v, this, new DragOptions());
return false;
}
@Override
public boolean supportsAppInfoDropTarget() {
return true;
}
@Override
public boolean supportsDeleteDropTarget() {
return false;
}
@Override
public float getIntrinsicIconScaleFactor() {
DeviceProfile grid = mLauncher.getDeviceProfile();
return (float) grid.allAppsIconSizePx / grid.iconSizePx;
DragOptions options = new DragOptions();
options.intrinsicIconScaleFactor = (float) grid.allAppsIconSizePx / grid.iconSizePx;
mLauncher.getWorkspace().beginDragShared(v, this, options);
return false;
}
@Override