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

Commit ca7b7629 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Translating the icon in the shelf with the notification" into pi-dev

am: 5b154cee

Change-Id: I2f7fd1d685c3a90a4a55c2f66c3ef412fd24c2ee
parents cd875b58 5b154cee
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1558,6 +1558,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                }
            }
            invalidateOutline();

            // In order to keep the shelf in sync with this swiping, we're simply translating
            // it's icon by the same amount. The translation is already being used for the normal
            // positioning, so we can use the scrollX instead.
            getEntry().expandedIcon.setScrollX((int) -translationX);
        }
        if (mMenuRow.getMenuView() != null) {
            mMenuRow.onTranslationUpdate(translationX);
+6 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
    private boolean mAnimationsEnabled = true;
    private boolean mShowNotificationShelf;
    private float mFirstElementRoundness;
    private Rect mClipRect = new Rect();

    public NotificationShelf(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -672,6 +673,11 @@ public class NotificationShelf extends ActivatableNotificationView implements
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        updateRelativeOffset();

        // we always want to clip to our sides, such that nothing can draw outside of these bounds
        int height = getResources().getDisplayMetrics().heightPixels;
        mClipRect.set(0, -height, getWidth(), height);
        mShelfIcons.setClipBounds(mClipRect);
    }

    private void updateRelativeOffset() {