Loading res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,10 @@ <attr name="minCellHeight" format="float" /> <attr name="minCellWidth" format="float" /> <!-- defaults to minCellHeight, if not specified --> <attr name="minCellHeightLandscape" format="float" /> <!-- defaults to minCellWidth, if not specified --> <attr name="minCellWidthLandscape" format="float" /> <!-- defaults to minCellHeight, if not specified --> <attr name="minCellHeightTwoPanelPortrait" format="float" /> <!-- defaults to minCellWidth, if not specified --> <attr name="minCellWidthTwoPanelPortrait" format="float" /> Loading Loading @@ -244,6 +248,8 @@ <!-- defaults to borderSpaceDps, if not specified --> <attr name="hotseatBorderSpace" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceLandscape" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceTwoPanelLandscape" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceTwoPanelPortrait" format="float" /> Loading @@ -270,6 +276,8 @@ <!-- Margin on left and right of the workspace when GridDisplayOption#isScalable is true --> <attr name="horizontalMargin" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginLandscape" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginTwoPanelLandscape" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginTwoPanelPortrait" format="float"/> Loading src/com/android/launcher3/CellLayout.java +13 −3 Original line number Diff line number Diff line Loading @@ -238,9 +238,19 @@ public class CellLayout extends ViewGroup { mActivity = ActivityContext.lookupContext(context); DeviceProfile deviceProfile = mActivity.getDeviceProfile(); mBorderSpace = mContainerType == FOLDER ? new Point(deviceProfile.folderCellLayoutBorderSpacePx) : new Point(deviceProfile.cellLayoutBorderSpacePx); switch (mContainerType) { case FOLDER: mBorderSpace = new Point(deviceProfile.folderCellLayoutBorderSpacePx); break; case HOTSEAT: mBorderSpace = new Point(deviceProfile.hotseatBorderSpace, deviceProfile.hotseatBorderSpace); break; case WORKSPACE: default: mBorderSpace = new Point(deviceProfile.cellLayoutBorderSpacePx); break; } mCellWidth = mCellHeight = -1; mFixedCellWidth = mFixedCellHeight = -1; Loading src/com/android/launcher3/DeviceProfile.java +2 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class DeviceProfile { public final int hotseatBarSidePaddingStartPx; public final int hotseatBarSidePaddingEndPx; public final int hotseatQsbHeight; public final int hotseatBorderSpace; public int hotseatBorderSpace; public final float qsbBottomMarginOriginalPx; public int qsbBottomMarginPx; Loading Loading @@ -716,6 +716,7 @@ public class DeviceProfile { } // Hotseat hotseatBorderSpace = pxFromDp(inv.hotseatBorderSpaces[mTypeIndex], mMetrics, scale); updateHotseatIconSize(iconSizePx); if (!isVerticalLayout) { Loading src/com/android/launcher3/InvariantDeviceProfile.java +11 −2 Original line number Diff line number Diff line Loading @@ -794,6 +794,11 @@ public class InvariantDeviceProfile { x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidth, 0); y = a.getFloat(R.styleable.ProfileDisplayOption_minCellHeight, 0); minCellSize[INDEX_DEFAULT] = new PointF(x, y); x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidthLandscape, minCellSize[INDEX_DEFAULT].x); y = a.getFloat(R.styleable.ProfileDisplayOption_minCellHeightLandscape, minCellSize[INDEX_DEFAULT].y); minCellSize[INDEX_LANDSCAPE] = new PointF(x, y); x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidthTwoPanelPortrait, Loading Loading @@ -896,7 +901,9 @@ public class InvariantDeviceProfile { horizontalMargin[INDEX_DEFAULT] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMargin, 0); horizontalMargin[INDEX_LANDSCAPE] = horizontalMargin[INDEX_DEFAULT]; horizontalMargin[INDEX_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMarginLandscape, horizontalMargin[INDEX_DEFAULT]); horizontalMargin[INDEX_TWO_PANEL_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMarginTwoPanelLandscape, horizontalMargin[INDEX_DEFAULT]); Loading @@ -906,7 +913,9 @@ public class InvariantDeviceProfile { hotseatBorderSpaces[INDEX_DEFAULT] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpace, borderSpace); hotseatBorderSpaces[INDEX_LANDSCAPE] = hotseatBorderSpaces[INDEX_DEFAULT]; hotseatBorderSpaces[INDEX_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpaceLandscape, hotseatBorderSpaces[INDEX_DEFAULT]); hotseatBorderSpaces[INDEX_TWO_PANEL_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpaceTwoPanelLandscape, hotseatBorderSpaces[INDEX_DEFAULT]); Loading Loading
res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,10 @@ <attr name="minCellHeight" format="float" /> <attr name="minCellWidth" format="float" /> <!-- defaults to minCellHeight, if not specified --> <attr name="minCellHeightLandscape" format="float" /> <!-- defaults to minCellWidth, if not specified --> <attr name="minCellWidthLandscape" format="float" /> <!-- defaults to minCellHeight, if not specified --> <attr name="minCellHeightTwoPanelPortrait" format="float" /> <!-- defaults to minCellWidth, if not specified --> <attr name="minCellWidthTwoPanelPortrait" format="float" /> Loading Loading @@ -244,6 +248,8 @@ <!-- defaults to borderSpaceDps, if not specified --> <attr name="hotseatBorderSpace" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceLandscape" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceTwoPanelLandscape" format="float" /> <!-- defaults to hotseatBorderSpace, if not specified --> <attr name="hotseatBorderSpaceTwoPanelPortrait" format="float" /> Loading @@ -270,6 +276,8 @@ <!-- Margin on left and right of the workspace when GridDisplayOption#isScalable is true --> <attr name="horizontalMargin" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginLandscape" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginTwoPanelLandscape" format="float"/> <!-- defaults to horizontalMargin if not specified --> <attr name="horizontalMarginTwoPanelPortrait" format="float"/> Loading
src/com/android/launcher3/CellLayout.java +13 −3 Original line number Diff line number Diff line Loading @@ -238,9 +238,19 @@ public class CellLayout extends ViewGroup { mActivity = ActivityContext.lookupContext(context); DeviceProfile deviceProfile = mActivity.getDeviceProfile(); mBorderSpace = mContainerType == FOLDER ? new Point(deviceProfile.folderCellLayoutBorderSpacePx) : new Point(deviceProfile.cellLayoutBorderSpacePx); switch (mContainerType) { case FOLDER: mBorderSpace = new Point(deviceProfile.folderCellLayoutBorderSpacePx); break; case HOTSEAT: mBorderSpace = new Point(deviceProfile.hotseatBorderSpace, deviceProfile.hotseatBorderSpace); break; case WORKSPACE: default: mBorderSpace = new Point(deviceProfile.cellLayoutBorderSpacePx); break; } mCellWidth = mCellHeight = -1; mFixedCellWidth = mFixedCellHeight = -1; Loading
src/com/android/launcher3/DeviceProfile.java +2 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class DeviceProfile { public final int hotseatBarSidePaddingStartPx; public final int hotseatBarSidePaddingEndPx; public final int hotseatQsbHeight; public final int hotseatBorderSpace; public int hotseatBorderSpace; public final float qsbBottomMarginOriginalPx; public int qsbBottomMarginPx; Loading Loading @@ -716,6 +716,7 @@ public class DeviceProfile { } // Hotseat hotseatBorderSpace = pxFromDp(inv.hotseatBorderSpaces[mTypeIndex], mMetrics, scale); updateHotseatIconSize(iconSizePx); if (!isVerticalLayout) { Loading
src/com/android/launcher3/InvariantDeviceProfile.java +11 −2 Original line number Diff line number Diff line Loading @@ -794,6 +794,11 @@ public class InvariantDeviceProfile { x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidth, 0); y = a.getFloat(R.styleable.ProfileDisplayOption_minCellHeight, 0); minCellSize[INDEX_DEFAULT] = new PointF(x, y); x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidthLandscape, minCellSize[INDEX_DEFAULT].x); y = a.getFloat(R.styleable.ProfileDisplayOption_minCellHeightLandscape, minCellSize[INDEX_DEFAULT].y); minCellSize[INDEX_LANDSCAPE] = new PointF(x, y); x = a.getFloat(R.styleable.ProfileDisplayOption_minCellWidthTwoPanelPortrait, Loading Loading @@ -896,7 +901,9 @@ public class InvariantDeviceProfile { horizontalMargin[INDEX_DEFAULT] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMargin, 0); horizontalMargin[INDEX_LANDSCAPE] = horizontalMargin[INDEX_DEFAULT]; horizontalMargin[INDEX_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMarginLandscape, horizontalMargin[INDEX_DEFAULT]); horizontalMargin[INDEX_TWO_PANEL_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_horizontalMarginTwoPanelLandscape, horizontalMargin[INDEX_DEFAULT]); Loading @@ -906,7 +913,9 @@ public class InvariantDeviceProfile { hotseatBorderSpaces[INDEX_DEFAULT] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpace, borderSpace); hotseatBorderSpaces[INDEX_LANDSCAPE] = hotseatBorderSpaces[INDEX_DEFAULT]; hotseatBorderSpaces[INDEX_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpaceLandscape, hotseatBorderSpaces[INDEX_DEFAULT]); hotseatBorderSpaces[INDEX_TWO_PANEL_LANDSCAPE] = a.getFloat( R.styleable.ProfileDisplayOption_hotseatBorderSpaceTwoPanelLandscape, hotseatBorderSpaces[INDEX_DEFAULT]); Loading