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

Commit 4e357827 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix panel height when only one notification is shown"

parents 8219a25e 2c5baca5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -232,8 +232,9 @@
    <!-- Space reserved for the cards behind the top card in the bottom stack -->
    <dimen name="bottom_stack_peek_amount">12dp</dimen>

    <!-- bottom_stack_peek_amount + notification_min_height -->
    <dimen name="min_stack_height">76dp</dimen>
    <!-- bottom_stack_peek_amount + notification_min_height
         + notification_collapse_second_card_padding -->
    <dimen name="min_stack_height">84dp</dimen>

    <!-- The height of the area before the bottom stack in which the notifications slow down -->
    <dimen name="bottom_stack_slow_down_length">12dp</dimen>
+5 −4
Original line number Diff line number Diff line
@@ -1317,7 +1317,8 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    public int getPeekHeight() {
        return mIntrinsicPadding + mCollapsedSize + mBottomStackPeekSize;
        return mIntrinsicPadding + mCollapsedSize + mBottomStackPeekSize
                + mCollapseSecondCardPadding;
    }

    private int clampPadding(int desiredPadding) {
@@ -1795,11 +1796,11 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    public int getEmptyBottomMargin() {
        int emptyMargin = mMaxLayoutHeight - mContentHeight;
        int emptyMargin = mMaxLayoutHeight - mContentHeight - mBottomStackPeekSize;
        if (needsHeightAdaption()) {
            emptyMargin = emptyMargin - mBottomStackSlowDownHeight - mBottomStackPeekSize;
            emptyMargin -= mBottomStackSlowDownHeight;
        } else {
            emptyMargin = emptyMargin - mBottomStackPeekSize;
            emptyMargin -= mCollapseSecondCardPadding;
        }
        return Math.max(emptyMargin, 0);
    }