Improve splitscreen recents animation in seascape

* We need to swap the primary and secondary thumbnail
positions in fake seascape since the primary is the
visually left app (which is the bottom in portrait)

Bug: 249693334
Change-Id: I325133ab86e4fcd26c6162a3de007d68e9ba6bf1
This commit is contained in:
Vinit Nayak
2022-10-06 17:28:57 -07:00
parent d7a7bfc304
commit c7d676ce15
2 changed files with 55 additions and 2 deletions
@@ -662,6 +662,16 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
secondarySnapshotHeight = totalThumbnailHeight - primarySnapshotHeight - dividerBar;
int translationY = primarySnapshotHeight + spaceAboveSnapshot + dividerBar;
secondarySnapshot.setTranslationY(translationY);
FrameLayout.LayoutParams primaryParams =
(FrameLayout.LayoutParams) primarySnapshot.getLayoutParams();
FrameLayout.LayoutParams secondaryParams =
(FrameLayout.LayoutParams) secondarySnapshot.getLayoutParams();
secondaryParams.topMargin = 0;
primaryParams.topMargin = spaceAboveSnapshot;
// Reset unused translations
primarySnapshot.setTranslationY(0);
secondarySnapshot.setTranslationX(0);
primarySnapshot.setTranslationX(0);
}