Merge "Fix 3099036: Drag visualization appears in wrong spot" into honeycomb

This commit is contained in:
Patrick Dubroy
2011-01-17 16:57:49 -08:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -2259,6 +2259,13 @@ public class Workspace extends SmoothPagedView
dragView.getDragRegionHeight());
}
}
} else if (source == this) {
// When dragging from the workspace, the drag view is slightly bigger than
// the original view, and offset vertically. Adjust to account for this.
final View origView = mDragInfo.cell;
originX += (dragView.getMeasuredWidth() - origView.getWidth()) / 2;
originY += (dragView.getMeasuredHeight() - origView.getHeight()) / 2
+ dragView.getOffsetY();
}
if (mDragTargetLayout != null) {