Small fix to deal with ugly widget dropping situations
-> Tried some more elaborate fixes in which aspect ratio of the preview were not preserved. Given that nothing clearly always better, going with a simple fix for now. Change-Id: I3dccf95680da55cccfb6f00befe88cea4bbe0035
This commit is contained in:
@@ -2960,7 +2960,8 @@ public class Workspace extends SmoothPagedView
|
||||
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(cellLayout, loc);
|
||||
resetTransitionTransform(cellLayout);
|
||||
|
||||
float dragViewScale = r.width() / d.dragView.getMeasuredWidth();
|
||||
float dragViewScale = Math.min(r.width() / d.dragView.getMeasuredWidth(),
|
||||
r.height() / d.dragView.getMeasuredHeight());
|
||||
// The animation will scale the dragView about its center, so we need to center about
|
||||
// the final location.
|
||||
loc[0] -= (d.dragView.getMeasuredWidth() - cellLayoutScale * r.width()) / 2;
|
||||
|
||||
Reference in New Issue
Block a user