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

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

Merge "Split tasks in RTL mode" into main

parents fb7f7c5a e0ccb4e6
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -543,15 +543,19 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {

        secondarySnapshotWidth = parentWidth;
        secondarySnapshotHeight = totalThumbnailHeight - primarySnapshotHeight - dividerBar;
        secondarySnapshot.setTranslationY(0);
        primarySnapshot.setTranslationY(secondarySnapshotHeight + spaceAboveSnapshot + dividerBar);

        int translationY = primarySnapshotHeight + spaceAboveSnapshot + dividerBar;
        primarySnapshot.setTranslationY(spaceAboveSnapshot);
        secondarySnapshot.setTranslationY(translationY - spaceAboveSnapshot);

        primarySnapshot.measure(
                View.MeasureSpec.makeMeasureSpec(primarySnapshotWidth, View.MeasureSpec.EXACTLY),
                View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY));
                View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY)
        );
        secondarySnapshot.measure(
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotWidth, View.MeasureSpec.EXACTLY),
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight,
                        View.MeasureSpec.EXACTLY));
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, View.MeasureSpec.EXACTLY)
        );
    }

    @Override
+2 −1
Original line number Diff line number Diff line
@@ -644,11 +644,12 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {

            secondarySnapshotHeight = totalThumbnailHeight;
            secondarySnapshotWidth = parentWidth - primarySnapshotWidth - scaledDividerBar;
            int translationX = primarySnapshotWidth + scaledDividerBar;
            if (isRtl) {
                int translationX = secondarySnapshotWidth + scaledDividerBar;
                primarySnapshot.setTranslationX(-translationX);
                secondarySnapshot.setTranslationX(0);
            } else {
                int translationX = primarySnapshotWidth + scaledDividerBar;
                secondarySnapshot.setTranslationX(translationX);
                primarySnapshot.setTranslationX(0);
            }
+5 −3
Original line number Diff line number Diff line
@@ -343,13 +343,15 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
        secondarySnapshotHeight = totalThumbnailHeight - primarySnapshotHeight - dividerBar;
        secondarySnapshot.setTranslationY(0);
        primarySnapshot.setTranslationY(secondarySnapshotHeight + spaceAboveSnapshot + dividerBar);

        primarySnapshot.measure(
                View.MeasureSpec.makeMeasureSpec(primarySnapshotWidth, View.MeasureSpec.EXACTLY),
                View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY));
                View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY)
        );
        secondarySnapshot.measure(
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotWidth, View.MeasureSpec.EXACTLY),
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight,
                        View.MeasureSpec.EXACTLY));
                View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, View.MeasureSpec.EXACTLY)
        );
    }

    /* ---------- The following are only used by TaskViewTouchHandler. ---------- */