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

Commit 0ceb4ae2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Apply layout param to NotificationShelf only when needed" into tm-qpr-dev

parents 620f597d e39a3e1f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -132,8 +132,11 @@ public class NotificationShelf extends ActivatableNotificationView implements
        mPaddingBetweenElements = res.getDimensionPixelSize(R.dimen.notification_divider_height);

        ViewGroup.LayoutParams layoutParams = getLayoutParams();
        layoutParams.height = res.getDimensionPixelOffset(R.dimen.notification_shelf_height);
        final int newShelfHeight = res.getDimensionPixelOffset(R.dimen.notification_shelf_height);
        if (newShelfHeight != layoutParams.height) {
            layoutParams.height = newShelfHeight;
            setLayoutParams(layoutParams);
        }

        final int padding = res.getDimensionPixelOffset(R.dimen.shelf_icon_container_padding);
        mShelfIcons.setPadding(padding, 0, padding, 0);