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

Commit 378053af authored by Selim Cinek's avatar Selim Cinek
Browse files

Enforcing padding on the bottom of the keyguard

When calculating the maximum padding, we need to require
some padding such that the indication text isn't overlapped

Test: add 6 notifications on sailfish, see no overlap
Bug: 32437839
Change-Id: I25effa3e971d4a0bfaef70615c8a6e29c906a6ed
parent 355652a6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@
    <!-- The amount the content shifts upwards when transforming into the icon -->
    <dimen name="notification_icon_transform_content_shift">32dp</dimen>

    <!-- The padding on the bottom of the notifications on the keyguard -->
    <dimen name="keyguard_indication_bottom_padding">12sp</dimen>

    <!-- Minimum layouted height of a notification in the statusbar-->
    <dimen name="min_notification_layout_height">48dp</dimen>

+5 −1
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ public class NotificationPanelView extends PanelView implements
    };
    private NotificationGroupManager mGroupManager;
    private boolean mOpening;
    private int mIndicationBottomPadding;

    public NotificationPanelView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -273,6 +274,8 @@ public class NotificationPanelView extends PanelView implements
                R.dimen.notification_panel_min_side_margin);
        mMaxFadeoutHeight = getResources().getDimensionPixelSize(
                R.dimen.max_notification_fadeout_height);
        mIndicationBottomPadding = getResources().getDimensionPixelSize(
                R.dimen.keyguard_indication_bottom_padding);
    }

    public void updateResources() {
@@ -406,7 +409,8 @@ public class NotificationPanelView extends PanelView implements
                R.dimen.notification_divider_height));
        float shelfSize = mNotificationStackScroller.getNotificationShelf().getIntrinsicHeight()
                + notificationPadding;
        float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize;
        float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize
                - mIndicationBottomPadding;
        int count = 0;
        for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {
            ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);