From e7b977ddd515ed6e6aa80739e47197505f1ab668 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 2 May 2022 15:31:21 -0700 Subject: [PATCH] Fix all app button taskbar animation in LTR and RTL. Bug: 225154998 Test: Open app, view taskbar, go back to home Repeat for both RTL, LTR Change-Id: Ifdc8074bef6e5f5a447a1f4110ccb387b18a7ea9 --- .../android/launcher3/taskbar/TaskbarViewController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java index 6416720962..ae9f655d5f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java @@ -258,12 +258,14 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar View child = mTaskbarView.getChildAt(i); int positionInHotseat = -1; - if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get() && i == count - 1) { + boolean isRtl = Utilities.isRtl(child.getResources()); + if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get() + && ((isRtl && i == 0) || (!isRtl && i == count - 1))) { // Note that there is no All Apps button in the hotseat, this position is only used // as its convenient for animation purposes. - positionInHotseat = Utilities.isRtl(child.getResources()) + positionInHotseat = isRtl ? -1 - : mActivity.getDeviceProfile().inv.numShownHotseatIcons; + : mActivity.getDeviceProfile().numShownHotseatIcons; setter.setViewAlpha(child, 0, LINEAR); } else if (child.getTag() instanceof ItemInfo) {