Merge "Adjust height of tablet AllApps base on row height" into tm-qpr-dev am: b0f42f03bf am: 16ac12b450

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19416113

Change-Id: I74473373191600555cd9154dc3aa0fc95477ca7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Chau
2022-08-04 14:40:46 +00:00
committed by Automerger Merge Worker
6 changed files with 58 additions and 50 deletions

View File

@@ -314,10 +314,10 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
int qsbEnd;
if (layoutRtl) {
qsbStart = iconEnd + mItemMarginLeftRight;
qsbEnd = qsbStart + deviceProfile.qsbWidth;
qsbEnd = qsbStart + deviceProfile.hotseatQsbWidth;
} else {
qsbEnd = iconEnd - mItemMarginLeftRight;
qsbStart = qsbEnd - deviceProfile.qsbWidth;
qsbStart = qsbEnd - deviceProfile.hotseatQsbWidth;
}
int qsbTop = (bottom - top - deviceProfile.hotseatQsbHeight) / 2;
int qsbBottom = qsbTop + deviceProfile.hotseatQsbHeight;

View File

@@ -295,10 +295,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
boolean isRtl = Utilities.isRtl(child.getResources());
float hotseatIconCenter = isRtl
? launcherDp.widthPx - hotseatPadding.right + borderSpacing
+ launcherDp.qsbWidth / 2f
: hotseatPadding.left - borderSpacing - launcherDp.qsbWidth / 2f;
+ launcherDp.hotseatQsbWidth / 2f
: hotseatPadding.left - borderSpacing - launcherDp.hotseatQsbWidth / 2f;
float childCenter = (child.getLeft() + child.getRight()) / 2f;
float halfQsbIconWidthDiff = (launcherDp.qsbWidth - taskbarDp.iconSizePx) / 2f;
float halfQsbIconWidthDiff =
(launcherDp.hotseatQsbWidth - taskbarDp.iconSizePx) / 2f;
setter.addFloat(child, ICON_TRANSLATE_X,
isRtl ? -halfQsbIconWidthDiff : halfQsbIconWidthDiff,
hotseatIconCenter - childCenter, LINEAR);
@@ -312,7 +313,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
: Interpolators.clampToProgress(LINEAR, 0.84f, 1f));
setter.addOnFrameListener(animator -> AlphaUpdateListener.updateVisibility(child));
float qsbInsetFraction = halfQsbIconWidthDiff / launcherDp.qsbWidth;
float qsbInsetFraction = halfQsbIconWidthDiff / launcherDp.hotseatQsbWidth;
if (child instanceof HorizontalInsettableView) {
setter.addFloat((HorizontalInsettableView) child,
HorizontalInsettableView.HORIZONTAL_INSETS, qsbInsetFraction, 0,