Merge "Fix all app button taskbar animation in LTR and RTL." into tm-dev am: e73c3075c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18119607
Change-Id: Ib93f23c56149c4b501ac4610db05458f8aec69e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index 9b6cc66..0be29ba 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -262,12 +262,14 @@
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) {