Wrong app icon position in seascape mode for RTL layout

Bug: 317072320
Test: manual
Flag: NONE

Change-Id: If998033d6008626941eb766dcc96803c25b8bf02
This commit is contained in:
Sergey Pinkevich
2023-12-19 13:53:51 +00:00
parent b6ebbb019c
commit 9b6587d80f
@@ -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,14 +295,25 @@ 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
primaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset
+ taskIconHeight);
secondaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset);
if (isRtl) {
primaryIconView.setTranslationY(bottomToMidpointOffset - insetOffset);
secondaryIconView.setTranslationY(bottomToMidpointOffset - insetOffset
+ taskIconHeight);
} else {
primaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset
+ taskIconHeight);
secondaryIconView.setTranslationY(-bottomToMidpointOffset - insetOffset);
}
} else {
// if not,
// the task on the left (primary) is slightly larger
primaryIconView.setTranslationY(-bottomToMidpointOffset + taskIconHeight);
secondaryIconView.setTranslationY(-bottomToMidpointOffset);
if (isRtl) {
primaryIconView.setTranslationY(bottomToMidpointOffset);
secondaryIconView.setTranslationY(bottomToMidpointOffset + taskIconHeight);
} else {
primaryIconView.setTranslationY(-bottomToMidpointOffset + taskIconHeight);
secondaryIconView.setTranslationY(-bottomToMidpointOffset);
}
}
primaryIconView.setLayoutParams(primaryIconParams);