Merge changes from topic "am-a465be7a-460d-4d89-9018-8c0df96ff268" into ub-launcher3-master

* changes:
  [automerger] Larger icons for L3Go and spacing changes. am: 846455e1ff
  Larger icons for L3Go and spacing changes.
This commit is contained in:
TreeHugger Robot
2017-10-03 21:34:52 +00:00
committed by Android (Google) Code Review
3 changed files with 36 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Dynamic Grid -->
<dimen name="dynamic_grid_hotseat_size">60dp</dimen>
</resources>
+1 -1
View File
@@ -25,7 +25,7 @@
launcher:numColumns="4"
launcher:numFolderRows="4"
launcher:numFolderColumns="4"
launcher:iconSize="56"
launcher:iconSize="60"
launcher:iconTextSize="14.0"
launcher:defaultLayoutId="@xml/default_workspace_4x4"
/>
+15 -3
View File
@@ -354,9 +354,18 @@ public class DeviceProfile {
iconTextSizePx = (int) (Utilities.pxFromSp(inv.iconTextSize, dm) * scale);
iconDrawablePaddingPx = (int) (iconDrawablePaddingOriginalPx * scale);
cellWidthPx = iconSizePx + iconDrawablePaddingPx;
cellHeightPx = iconSizePx + iconDrawablePaddingPx
+ Utilities.calculateTextHeight(iconTextSizePx);
int cellYPadding = (getCellSize().y - cellHeightPx) / 2;
if (iconDrawablePaddingPx > cellYPadding && !isVerticalBarLayout()
&& !inMultiWindowMode()) {
// Ensures that the label is closer to its corresponding icon. This is not an issue
// with vertical bar layout or multi-window mode since the issue is handled separately
// with their calls to {@link #adjustToHideWorkspaceLabels}.
cellHeightPx -= (iconDrawablePaddingPx - cellYPadding);
iconDrawablePaddingPx = cellYPadding;
}
cellWidthPx = iconSizePx + iconDrawablePaddingPx;
// All apps
allAppsIconTextSizePx = iconTextSizePx;
@@ -759,11 +768,14 @@ public class DeviceProfile {
return new int[] { padding.left - mInsets.left, padding.right + mInsets.left};
}
public boolean inMultiWindowMode() {
return this != inv.landscapeProfile && this != inv.portraitProfile;
}
public boolean shouldIgnoreLongPressToOverview(float touchX) {
boolean inMultiWindowMode = this != inv.landscapeProfile && this != inv.portraitProfile;
boolean touchedLhsEdge = mInsets.left == 0 && touchX < edgeMarginPx;
boolean touchedRhsEdge = mInsets.right == 0 && touchX > (widthPx - edgeMarginPx);
return !inMultiWindowMode && (touchedLhsEdge || touchedRhsEdge);
return !inMultiWindowMode() && (touchedLhsEdge || touchedRhsEdge);
}
private static Context getContext(Context c, int orientation) {