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 committed 2016-11-15 11:19:03 -08:00
1 parent f8d5370a9f
commit 93e1f04fa9
6 files changed
+38 -16

No files matched your search

+9 -1
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) {