diff options
author | Adam Cohen <adamcohen@google.com> | 2011-11-18 11:34:22 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-18 11:34:22 -0800 |
commit | aa1e57286d5435fff0ad1de894cf9d3d730b5e59 (patch) | |
tree | 1fe9184d8f5c8040b57ab59befcb96f3554c3b5f /src | |
parent | b0736fac73b0df95f18234a0494aea3f3fc6c735 (diff) | |
parent | bad24941cdc9fd6bfa17f90a72157466b7b00f68 (diff) | |
download | android_packages_apps_Trebuchet-aa1e57286d5435fff0ad1de894cf9d3d730b5e59.tar.gz android_packages_apps_Trebuchet-aa1e57286d5435fff0ad1de894cf9d3d730b5e59.tar.bz2 android_packages_apps_Trebuchet-aa1e57286d5435fff0ad1de894cf9d3d730b5e59.zip |
Merge "Small fix to deal with ugly widget dropping situations" into ics-mr1
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 0598cd968..79e994203 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -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; |