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

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

No files matched your search

+2 -5
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);
}
}