如果我想更改桌面应用程序图标向左或向右拖动其他应用程序图标效果,应该在启动器中哪个方法更改?是在DragController中findDropTarget()修改?我无法找到修改的地方。在这种方法中实现对吗?还是其他的?
private DropTarget findDropTarget(int x, int y, int[] dropCoordinates) {
final Rect r = mRectTemp;
final ArrayList<DropTarget> dropTargets = mDropTargets;
final int count = dropTargets.size();
for (int i=count-1; i>=0; i--) {
DropTarget target = dropTargets.get(i);
if (!target.isDropEnabled())
continue;
target.getHitRectRelativeToDragLayer(r);
mDragObject.x = x;
mDragObject.y = y;
if (r.contains(x, y)) {
if (mLauncher.isWidgetTools()){
target.getLocationInDragLayer(dropCoordinates);
dropCoordinates[0] = x - dropCoordinates[0];
dropCoordinates[1] = y - dropCoordinates[1];
} else {
dropCoordinates[0] = x;
dropCoordinates[1] = y;
mLauncher.getDragLayer().mapCoordInSelfToDescendent((View) target, dropCoordinates);
}
return target;
// }
}
}
return null;
}