From 97b3389cd7ca940b7734fcd828ac7850fc20df08 Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Wed, 5 Mar 2025 16:10:47 +0000 Subject: [PATCH] Fix split screen app chip position in portrait mode Adjusted the secondary app chip's split translation in portrait mode to account for the divider size, ensuring correct positioning in split screen. Fix: 314326993 Flag: com.android.launcher3.enable_overview_icon_menu Test: OverviewImageTest Test: OverviewSplitTaskImageTest Change-Id: I39eae8b5f1ac8cff6b466cff5b6fb16f0a6e9647 --- .../quickstep/orientation/PortraitPagedViewHandler.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt index 18836492b6..74ae688bd7 100644 --- a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt @@ -726,7 +726,11 @@ class PortraitPagedViewHandler : DefaultPagedViewHandler(), RecentsPagedOrientat val secondarySnapshotWidth = groupedTaskViewWidth - primarySnapshotWidth primaryAppChipView.setSplitTranslationX(-secondarySnapshotWidth.toFloat()) } else { - secondaryAppChipView.setSplitTranslationX(primarySnapshotWidth.toFloat()) + val dividerSize = + Math.round(groupedTaskViewWidth * splitConfig.dividerPercent) + secondaryAppChipView.setSplitTranslationX( + primarySnapshotWidth.toFloat() + dividerSize + ) } } else { primaryAppChipView.setSplitTranslationX(0f)