use of com.android.launcher3.dragndrop.BaseItemDragListener in project Neo-Launcher by NeoApplications.
the class FolderIcon method onDrop.
public void onDrop(DragObject d, boolean itemReturnedOnFailedDrop) {
WorkspaceItemInfo item;
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeWorkspaceItem();
} else if (d.dragSource instanceof BaseItemDragListener) {
// Came from a different window -- make a copy
item = new WorkspaceItemInfo((WorkspaceItemInfo) d.dragInfo);
} else {
item = (WorkspaceItemInfo) d.dragInfo;
}
mFolder.notifyDrop();
onDrop(item, d.dragView, null, 1.0f, itemReturnedOnFailedDrop ? item.rank : mInfo.contents.size(), itemReturnedOnFailedDrop);
}
use of com.android.launcher3.dragndrop.BaseItemDragListener in project android_packages_apps_Launcher3 by ProtonAOSP.
the class FolderIcon method onDrop.
public void onDrop(DragObject d, boolean itemReturnedOnFailedDrop) {
WorkspaceItemInfo item;
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeWorkspaceItem();
} else if (d.dragSource instanceof BaseItemDragListener) {
// Came from a different window -- make a copy
item = new WorkspaceItemInfo((WorkspaceItemInfo) d.dragInfo);
} else {
item = (WorkspaceItemInfo) d.dragInfo;
}
mFolder.notifyDrop();
onDrop(item, d, null, 1.0f, itemReturnedOnFailedDrop ? item.rank : mInfo.contents.size(), itemReturnedOnFailedDrop);
}
use of com.android.launcher3.dragndrop.BaseItemDragListener in project android_packages_apps_404Launcher by P-404.
the class FolderIcon method onDrop.
public void onDrop(DragObject d, boolean itemReturnedOnFailedDrop) {
WorkspaceItemInfo item;
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeWorkspaceItem();
} else if (d.dragSource instanceof BaseItemDragListener) {
// Came from a different window -- make a copy
item = new WorkspaceItemInfo((WorkspaceItemInfo) d.dragInfo);
} else {
item = (WorkspaceItemInfo) d.dragInfo;
}
mFolder.notifyDrop();
onDrop(item, d, null, 1.0f, itemReturnedOnFailedDrop ? item.rank : mInfo.contents.size(), itemReturnedOnFailedDrop);
}
use of com.android.launcher3.dragndrop.BaseItemDragListener in project android_packages_apps_Launcher3 by crdroidandroid.
the class FolderIcon method onDrop.
public void onDrop(DragObject d, boolean itemReturnedOnFailedDrop) {
WorkspaceItemInfo item;
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeWorkspaceItem();
} else if (d.dragSource instanceof BaseItemDragListener) {
// Came from a different window -- make a copy
item = new WorkspaceItemInfo((WorkspaceItemInfo) d.dragInfo);
} else {
item = (WorkspaceItemInfo) d.dragInfo;
}
mFolder.notifyDrop();
onDrop(item, d, null, 1.0f, itemReturnedOnFailedDrop ? item.rank : mInfo.contents.size(), itemReturnedOnFailedDrop);
}
use of com.android.launcher3.dragndrop.BaseItemDragListener in project android_packages_apps_Trebuchet by LineageOS.
the class FolderIcon method onDrop.
public void onDrop(DragObject d, boolean itemReturnedOnFailedDrop) {
WorkspaceItemInfo item;
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeWorkspaceItem();
} else if (d.dragSource instanceof BaseItemDragListener) {
// Came from a different window -- make a copy
item = new WorkspaceItemInfo((WorkspaceItemInfo) d.dragInfo);
} else {
item = (WorkspaceItemInfo) d.dragInfo;
}
mFolder.notifyDrop();
onDrop(item, d, null, 1.0f, itemReturnedOnFailedDrop ? item.rank : mInfo.contents.size(), itemReturnedOnFailedDrop);
}
Aggregations