Hide workspace text in multi-window mode.

* Vertically centers workspace icons.
* New iconDisplay value so shortcut text is not overriden.

Bug: 32176631

Change-Id: I86753bab5b24aafc417e0f77d8c471fc4c0dc7f0
This commit is contained in:
Jon Miranda
2016-11-11 14:13:04 -08:00
parent f8d5370a9f
commit 93e1f04fa9
6 changed files with 38 additions and 16 deletions

View File

@@ -207,7 +207,15 @@ public class DeviceProfile {
// In multi-window mode, we can have widthPx = availableWidthPx
// and heightPx = availableHeightPx because Launcher uses the InvariantDeviceProfiles'
// widthPx and heightPx values where it's needed.
return new DeviceProfile(context, inv, mwSize, mwSize, mwSize.x, mwSize.y, isLandscape);
DeviceProfile profile = new DeviceProfile(context, inv, mwSize, mwSize, mwSize.x, mwSize.y,
isLandscape);
// Hide labels on the workspace.
profile.iconTextSizePx = 0;
profile.cellHeightPx = profile.iconSizePx + profile.iconDrawablePaddingPx
+ Utilities.calculateTextHeight(profile.iconTextSizePx);
return profile;
}
public void addLauncherLayoutChangedListener(LauncherLayoutChangeListener listener) {