summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop
diff options
context:
space:
mode:
authorSamuel Fufa <sfufa@google.com>2019-09-25 13:30:55 -0700
committerSamuel Fufa <sfufa@google.com>2019-09-26 12:21:45 -0700
commit45812a9ed6b75427b3076907bc8717472cd238b2 (patch)
treeb1adde892e63aee455c0f6b5006ca8a187d1a31e /src/com/android/launcher3/dragndrop
parentc50fe371b16e903eefa33196703b710042b107e2 (diff)
downloadandroid_packages_apps_Trebuchet-45812a9ed6b75427b3076907bc8717472cd238b2.tar.gz
android_packages_apps_Trebuchet-45812a9ed6b75427b3076907bc8717472cd238b2.tar.bz2
android_packages_apps_Trebuchet-45812a9ed6b75427b3076907bc8717472cd238b2.zip
Drag and drop preview size for BubbleTextView
Test:Manual Bug:141260670,141263002 Change-Id: If08dba28cce3ae07bb39ddad3743dd5eea92cb90
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r--src/com/android/launcher3/dragndrop/DragLayer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index b59164ae0..cdc70611d 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -284,7 +284,8 @@ public class DragLayer extends BaseDragLayer<Launcher> {
// The child may be scaled (always about the center of the view) so to account for it,
// we have to offset the position by the scaled size. Once we do that, we can center
// the drag view about the scaled child view.
- toY += Math.round(toScale * tv.getPaddingTop());
+ // padding will remain constant (does not scale with size)
+ toY += tv.getPaddingTop();
toY -= dragView.getMeasuredHeight() * (1 - toScale) / 2;
if (dragView.getDragVisualizeOffset() != null) {
toY -= Math.round(toScale * dragView.getDragVisualizeOffset().y);