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

Commit 68955e75 authored by Arthur Hung's avatar Arthur Hung Committed by android-build-merger
Browse files

Merge "Merge "FixBug: Round corner gone when scroll to non-first item and drag...

Merge "Merge "FixBug: Round corner gone when scroll to non-first item and drag to close" into pi-dev am: d732ec69" into pi-dev-plus-aosp
am: bcc442d7

Change-Id: I69c0542bcac7e2370f93b3db53ad56f3d0740923
parents 6e0a9e6d bcc442d7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -760,7 +760,9 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    private void updateClippingToTopRoundedCorner() {
        Float clipStart = (float) mTopPadding + mAmbientState.getExpandAnimationTopChange();
        Float clipStart = (float) mTopPadding
                                 + mStackTranslation
                                 + mAmbientState.getExpandAnimationTopChange();
        Float clipEnd = clipStart + mCornerRadius;
        boolean first = true;
        for (int i = 0; i < getChildCount(); i++) {
@@ -769,8 +771,7 @@ public class NotificationStackScrollLayout extends ViewGroup
                continue;
            }
            float start = child.getTranslationY();
            float end = start + Math.max(child.getActualHeight() - child.getClipBottomAmount(),
                    0);
            float end = start + child.getActualHeight();
            boolean clip = clipStart > start && clipStart < end
                    || clipEnd >= start && clipEnd <= end;
            clip &= !(first && mOwnScrollY == 0);