Merge "Update icon badges to match spec" into ub-launcher3-dorval

am: 0fa96ea2f6

Change-Id: I5f8e6bdbca13435d54e3b636564f7d3eef58ca5c
This commit is contained in:
Tony Wickham
2017-04-25 23:59:41 +00:00
committed by android-build-merger
10 changed files with 177 additions and 102 deletions

View File

@@ -2245,16 +2245,12 @@ public class Workspace extends PagedView
Point dragVisualizeOffset = null;
Rect dragRect = null;
if (child instanceof BubbleTextView) {
int iconSize = grid.iconSizePx;
int top = child.getPaddingTop();
int left = (b.getWidth() - iconSize) / 2;
int right = left + iconSize;
int bottom = top + iconSize;
dragLayerY += top;
// Note: The drag region is used to calculate drag layer offsets, but the
dragRect = new Rect();
((BubbleTextView) child).getIconBounds(dragRect);
dragLayerY += dragRect.top;
// Note: The dragRect is used to calculate drag layer offsets, but the
// dragVisualizeOffset in addition to the dragRect (the size) to position the outline.
dragVisualizeOffset = new Point(- halfPadding, halfPadding);
dragRect = new Rect(left, top, right, bottom);
} else if (child instanceof FolderIcon) {
int previewSize = grid.folderIconSizePx;
dragVisualizeOffset = new Point(- halfPadding, halfPadding - child.getPaddingTop());