From 387e99f4bcb28f019a56c28c56c6f6261219904b Mon Sep 17 00:00:00 2001 From: Sergey Pinkevich Date: Thu, 4 Jan 2024 14:54:30 +0000 Subject: [PATCH] Revert "Wrong app icon position in seascape mode for RTL layout" This reverts commit 9b6587d80f7aa499fe230cfddac77680f852657b. Reason for revert: Show app icons in wrong order Change-Id: I0fcc6b6f6431a8e596a504f5f7eb2c2d533be887 --- .../touch/SeascapePagedViewHandler.java | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java index 63e9bfab55..06526a876e 100644 --- a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java +++ b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java @@ -285,7 +285,7 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler { primaryIconView.setTranslationX(0); secondaryIconView.setTranslationX(0); if (enableOverviewIconMenu()) { - if (isRtl) { + if (primaryIconView.getLayoutDirection() == LAYOUT_DIRECTION_RTL) { primaryIconView.setTranslationY(groupedTaskViewHeight - primarySnapshotHeight); secondaryIconView.setTranslationY(0); } else { @@ -295,25 +295,14 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler { } else if (splitConfig.initiatedFromSeascape) { // if the split was initiated from seascape, // the task on the right (secondary) is slightly larger - if (isRtl) { - primaryIconView.setTranslationY(bottomToMidpointOffset - insetOffset); - secondaryIconView.setTranslationY(bottomToMidpointOffset - insetOffset - + taskIconHeight); - } else { - primaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset - + taskIconHeight); - secondaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset); - } + primaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset + + taskIconHeight); + secondaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset); } else { // if not, // the task on the left (primary) is slightly larger - if (isRtl) { - primaryIconView.setTranslationY(bottomToMidpointOffset); - secondaryIconView.setTranslationY(bottomToMidpointOffset + taskIconHeight); - } else { - primaryIconView.setTranslationY(-bottomToMidpointOffset + taskIconHeight); - secondaryIconView.setTranslationY(-bottomToMidpointOffset); - } + primaryIconView.setTranslationY(-bottomToMidpointOffset + taskIconHeight); + secondaryIconView.setTranslationY(-bottomToMidpointOffset); } primaryIconView.setLayoutParams(primaryIconParams);