Merge "Simplifying the drop animation code" into sc-v2-dev

This commit is contained in:
Sunny Goyal
2021-06-16 23:18:16 +00:00
committed by Android (Google) Code Review
6 changed files with 104 additions and 165 deletions

View File

@@ -2732,9 +2732,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
public void animateWidgetDrop(ItemInfo info, CellLayout cellLayout, final DragView dragView,
final Runnable onCompleteRunnable, int animationType, final View finalView,
boolean external) {
Rect from = new Rect();
mLauncher.getDragLayer().getViewRectRelativeToSelf(dragView, from);
int[] finalPos = new int[2];
float scaleXY[] = new float[2];
boolean scalePreview = !(info instanceof PendingAddShortcutInfo);
@@ -2778,8 +2775,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
}
}
};
dragLayer.animateViewIntoPosition(dragView, from.left, from.top, finalPos[0],
finalPos[1], 1, 1, 1, scaleXY[0], scaleXY[1], onComplete, endStyle,
dragLayer.animateViewIntoPosition(dragView, finalPos[0],
finalPos[1], 1, scaleXY[0], scaleXY[1], onComplete, endStyle,
duration, this);
}
}