Loading src/com/android/launcher3/CellLayout.java +0 −3 Original line number Diff line number Diff line Loading @@ -684,9 +684,6 @@ public class CellLayout extends ViewGroup { if (child instanceof BubbleTextView) { BubbleTextView bubbleChild = (BubbleTextView) child; bubbleChild.setTextVisibility(mContainerType != HOTSEAT); if (mActivity.getDeviceProfile().isScalableGrid) { bubbleChild.setCenterVertically(mContainerType != HOTSEAT); } } child.setScaleX(mChildScale); Loading src/com/android/launcher3/ShortcutAndWidgetContainer.java +5 −3 Original line number Diff line number Diff line Loading @@ -138,12 +138,14 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon. mBorderSpacing, null); // Center the icon/folder int cHeight = getCellContentHeight(); int cellPaddingY = (int) Math.max(0, ((lp.height - cHeight) / 2f)); int cellPaddingY = dp.isScalableGrid && mContainerType == WORKSPACE ? dp.cellYPaddingPx : (int) Math.max(0, ((lp.height - cHeight) / 2f)); // No need to add padding when cell layout border spacing is present. boolean noPadding = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE) boolean noPaddingX = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE) || (dp.folderCellLayoutBorderSpacingPx > 0 && mContainerType == FOLDER); int cellPaddingX = noPadding int cellPaddingX = noPaddingX ? 0 : mContainerType == WORKSPACE ? dp.workspaceCellPaddingXPx Loading src/com/android/launcher3/folder/FolderAnimationManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -245,9 +245,8 @@ public class FolderAnimationManager { + mDeviceProfile.folderCellHeightPx * 2; int page = mIsOpening ? mContent.getCurrentPage() : mContent.getDestinationPage(); int left = mContent.getPaddingLeft() + page * lp.width; Rect contentStart = new Rect(0, 0, width, height); Rect contentEnd = new Rect(endRect.left + left, endRect.top, endRect.right + left, endRect.bottom); Rect contentStart = new Rect(left, 0, left + width, height); Rect contentEnd = new Rect(left, 0, left + lp.width, lp.height); play(a, getShape().createRevealAnimator( mFolder.getContent(), contentStart, contentEnd, finalRadius, !mIsOpening)); Loading src/com/android/launcher3/folder/FolderIcon.java +0 −5 Original line number Diff line number Diff line Loading @@ -174,8 +174,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel folder.setFolderIcon(icon); folder.bind(folderInfo); icon.setFolder(folder); icon.mBackground.paddingY = icon.isInHotseat() ? 0 : activityContext.getDeviceProfile().cellYPaddingPx; return icon; } Loading Loading @@ -217,7 +215,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel icon.setAccessibilityDelegate(activity.getAccessibilityDelegate()); icon.mBackground.paddingY = icon.isInHotseat() ? 0 : grid.cellYPaddingPx; icon.mPreviewVerifier = new FolderGridOrganizer(activity.getDeviceProfile().inv); icon.mPreviewVerifier.setFolderInfo(folderInfo); icon.updatePreviewItems(false); Loading Loading @@ -580,7 +577,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel public void setFolderBackground(PreviewBackground bg) { mBackground = bg; mBackground.setInvalidateDelegate(this); mBackground.paddingY = isInHotseat() ? 0 : mActivity.getDeviceProfile().cellYPaddingPx; } @Override Loading Loading @@ -628,7 +624,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel if (!mForceHideDot && ((mDotInfo != null && mDotInfo.hasDot()) || mDotScale > 0)) { Rect iconBounds = mDotParams.iconBounds; BubbleTextView.getIconBounds(this, iconBounds, mActivity.getDeviceProfile().iconSizePx); iconBounds.offset(0, mBackground.paddingY); float iconScale = (float) mBackground.previewSize / iconBounds.width(); Utilities.scaleRectAboutCenter(iconBounds, iconScale); Loading src/com/android/launcher3/folder/PreviewBackground.java +1 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { int previewSize; int basePreviewOffsetX; int basePreviewOffsetY; int paddingY; private CellLayout mDrawingDelegate; Loading Loading @@ -161,7 +160,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { previewSize = grid.folderIconSizePx; basePreviewOffsetX = (availableSpaceX - previewSize) / 2; basePreviewOffsetY = paddingY + topPadding + grid.folderIconOffsetYPx; basePreviewOffsetY = topPadding + grid.folderIconOffsetYPx; // Stroke width is 1dp mStrokeWidth = context.getResources().getDisplayMetrics().density; Loading Loading
src/com/android/launcher3/CellLayout.java +0 −3 Original line number Diff line number Diff line Loading @@ -684,9 +684,6 @@ public class CellLayout extends ViewGroup { if (child instanceof BubbleTextView) { BubbleTextView bubbleChild = (BubbleTextView) child; bubbleChild.setTextVisibility(mContainerType != HOTSEAT); if (mActivity.getDeviceProfile().isScalableGrid) { bubbleChild.setCenterVertically(mContainerType != HOTSEAT); } } child.setScaleX(mChildScale); Loading
src/com/android/launcher3/ShortcutAndWidgetContainer.java +5 −3 Original line number Diff line number Diff line Loading @@ -138,12 +138,14 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon. mBorderSpacing, null); // Center the icon/folder int cHeight = getCellContentHeight(); int cellPaddingY = (int) Math.max(0, ((lp.height - cHeight) / 2f)); int cellPaddingY = dp.isScalableGrid && mContainerType == WORKSPACE ? dp.cellYPaddingPx : (int) Math.max(0, ((lp.height - cHeight) / 2f)); // No need to add padding when cell layout border spacing is present. boolean noPadding = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE) boolean noPaddingX = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE) || (dp.folderCellLayoutBorderSpacingPx > 0 && mContainerType == FOLDER); int cellPaddingX = noPadding int cellPaddingX = noPaddingX ? 0 : mContainerType == WORKSPACE ? dp.workspaceCellPaddingXPx Loading
src/com/android/launcher3/folder/FolderAnimationManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -245,9 +245,8 @@ public class FolderAnimationManager { + mDeviceProfile.folderCellHeightPx * 2; int page = mIsOpening ? mContent.getCurrentPage() : mContent.getDestinationPage(); int left = mContent.getPaddingLeft() + page * lp.width; Rect contentStart = new Rect(0, 0, width, height); Rect contentEnd = new Rect(endRect.left + left, endRect.top, endRect.right + left, endRect.bottom); Rect contentStart = new Rect(left, 0, left + width, height); Rect contentEnd = new Rect(left, 0, left + lp.width, lp.height); play(a, getShape().createRevealAnimator( mFolder.getContent(), contentStart, contentEnd, finalRadius, !mIsOpening)); Loading
src/com/android/launcher3/folder/FolderIcon.java +0 −5 Original line number Diff line number Diff line Loading @@ -174,8 +174,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel folder.setFolderIcon(icon); folder.bind(folderInfo); icon.setFolder(folder); icon.mBackground.paddingY = icon.isInHotseat() ? 0 : activityContext.getDeviceProfile().cellYPaddingPx; return icon; } Loading Loading @@ -217,7 +215,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel icon.setAccessibilityDelegate(activity.getAccessibilityDelegate()); icon.mBackground.paddingY = icon.isInHotseat() ? 0 : grid.cellYPaddingPx; icon.mPreviewVerifier = new FolderGridOrganizer(activity.getDeviceProfile().inv); icon.mPreviewVerifier.setFolderInfo(folderInfo); icon.updatePreviewItems(false); Loading Loading @@ -580,7 +577,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel public void setFolderBackground(PreviewBackground bg) { mBackground = bg; mBackground.setInvalidateDelegate(this); mBackground.paddingY = isInHotseat() ? 0 : mActivity.getDeviceProfile().cellYPaddingPx; } @Override Loading Loading @@ -628,7 +624,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel if (!mForceHideDot && ((mDotInfo != null && mDotInfo.hasDot()) || mDotScale > 0)) { Rect iconBounds = mDotParams.iconBounds; BubbleTextView.getIconBounds(this, iconBounds, mActivity.getDeviceProfile().iconSizePx); iconBounds.offset(0, mBackground.paddingY); float iconScale = (float) mBackground.previewSize / iconBounds.width(); Utilities.scaleRectAboutCenter(iconBounds, iconScale); Loading
src/com/android/launcher3/folder/PreviewBackground.java +1 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { int previewSize; int basePreviewOffsetX; int basePreviewOffsetY; int paddingY; private CellLayout mDrawingDelegate; Loading Loading @@ -161,7 +160,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing { previewSize = grid.folderIconSizePx; basePreviewOffsetX = (availableSpaceX - previewSize) / 2; basePreviewOffsetY = paddingY + topPadding + grid.folderIconOffsetYPx; basePreviewOffsetY = topPadding + grid.folderIconOffsetYPx; // Stroke width is 1dp mStrokeWidth = context.getResources().getDisplayMetrics().density; Loading