Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19265a47 authored by Sergey Pinkevich's avatar Sergey Pinkevich Committed by Android (Google) Code Review
Browse files

Merge "Place app icons in correct place in RTL for Seascape mode" into main

parents 1438af66 f595fc31
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
        primaryIconView.setTranslationX(0);
        secondaryIconView.setTranslationX(0);
        if (enableOverviewIconMenu()) {
            if (primaryIconView.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
            if (isRtl) {
                primaryIconView.setTranslationY(groupedTaskViewHeight - primarySnapshotHeight);
                secondaryIconView.setTranslationY(0);
            } else {
@@ -295,15 +295,26 @@ 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
                        + taskIconHeight);
                secondaryIconView.setTranslationY(bottomToMidpointOffset - insetOffset);
            } else {
                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 + taskIconHeight);
                secondaryIconView.setTranslationY(bottomToMidpointOffset);
            } else {
                primaryIconView.setTranslationY(-bottomToMidpointOffset + taskIconHeight);
                secondaryIconView.setTranslationY(-bottomToMidpointOffset);
            }
        }

        primaryIconView.setLayoutParams(primaryIconParams);
        secondaryIconView.setLayoutParams(secondaryIconParams);