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

Commit 4ade3fd5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix adjacent page offset in landscape orientation" into...

Merge "Fix adjacent page offset in landscape orientation" into ub-launcher3-rvc-qpr-dev am: 3f20e33a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12327711

Change-Id: I8f2da96439372a9f6671469c3c41e4c0a43a4067
parents 8ccd877f 3f20e33a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1890,7 +1890,9 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
                    : i < modalMidpoint
                            ? modalLeftOffsetSize
                            : modalRightOffsetSize;
            getChildAt(i).setTranslationX(translation + modalTranslation);
            float totalTranslation = translation + modalTranslation;
            mOrientationHandler.getPrimaryViewTranslate().set(getChildAt(i),
                    totalTranslation * mOrientationHandler.getPrimaryTranslationDirectionFactor());
        }
        updateCurveProperties();
    }
+5 −0
Original line number Diff line number Diff line
@@ -215,6 +215,11 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
        return HORIZONTAL;
    }

    @Override
    public int getPrimaryTranslationDirectionFactor() {
        return -1;
    }

    @Override
    public int getTaskDismissDirectionFactor() {
        return 1;
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public interface PagedOrientationHandler {
    int getScrollOffsetStart(View view, Rect insets);
    int getScrollOffsetEnd(View view, Rect insets);
    SingleAxisSwipeDetector.Direction getOppositeSwipeDirection();
    int getPrimaryTranslationDirectionFactor();
    int getTaskDismissDirectionFactor();
    int getTaskDragDisplacementFactor(boolean isRtl);
    ChildBounds getChildBounds(View child, int childStart, int pageCenter, boolean layoutChild);
+5 −0
Original line number Diff line number Diff line
@@ -212,6 +212,11 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
        return VERTICAL;
    }

    @Override
    public int getPrimaryTranslationDirectionFactor() {
        return 1;
    }

    @Override
    public int getTaskDismissDirectionFactor() {
        return -1;