Fixing issue where the cling is offset. (Bug 7633074)

- Also fixing issue where the workspace cling was showing on top of AllApps when you entered it for the first time.

Change-Id: I7d59ad153de192bc1d69537af1b4af632465138b
This commit is contained in:
Winson Chung
2012-11-29 14:29:38 -08:00
parent 1ef2123ccd
commit 7819abd2d1
6 changed files with 57 additions and 42 deletions
@@ -499,9 +499,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
int[] pos = mWidgetSpacingLayout.estimateCellPosition(mClingFocusedX, mClingFocusedY);
mLauncher.getDragLayer().getLocationInDragLayer(this, offset);
// PagedViews are centered horizontally but top aligned
// Note we have to shift the items up now that Launcher sits under the status bar
pos[0] += (getMeasuredWidth() - mWidgetSpacingLayout.getMeasuredWidth()) / 2 +
offset[0];
pos[1] += offset[1];
pos[1] += offset[1] - mLauncher.getDragLayer().getPaddingTop();
mLauncher.showFirstRunAllAppsCling(pos);
}
}