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

Commit 82a926e5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Increase text margin for expanded notifs" into main

parents 49ed0ef3 61270679
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -6197,14 +6197,21 @@ public class Notification implements Parcelable
            updateExpanderAlignment(contentView, p, hasSecondLine);
            setHeaderlessVerticalMargins(contentView, p, hasSecondLine);
            if (notificationsRedesignTemplates() && !p.mHeaderless) {
                // Update margins to leave space for the top line (but not for headerless views like
            // HUNS, which use a different layout that already accounts for that). Templates that
            // have content that will be displayed under the small icon also use a different margin.
            if (Flags.notificationsRedesignTemplates() && !p.mHeaderless) {
                // HUNS, which use a different layout that already accounts for that). Templates
                // that have content that will be displayed under the small icon also use a
                // different margin.
                int margin = getContentMarginTop(mContext,
                        R.dimen.notification_2025_content_margin_top);
                contentView.setViewLayoutMargin(R.id.notification_main_column,
                        RemoteViews.MARGIN_TOP, margin, COMPLEX_UNIT_PX);
                // Use a slightly larger text margin for expanded text with the redesign
                int textMarginForLargeIcon = mContext.getResources().getDimensionPixelSize(
                        R.dimen.notification_2025_text_margin_top);
                contentView.setViewLayoutMargin(p.mTextViewId, RemoteViews.MARGIN_TOP,
                        textMarginForLargeIcon, COMPLEX_UNIT_PX);
            }
            return contentView;
+3 −0
Original line number Diff line number Diff line
@@ -663,6 +663,9 @@
    <!-- The margin on top of the text of the notification -->
    <dimen name="notification_text_margin_top">6dp</dimen>

    <!-- The margin on top of the text of the notification to accommodate the large icon -->
    <dimen name="notification_2025_text_margin_top">8dp</dimen>

    <!-- Height of a single line text view in a notification -->
    <dimen name="notification_text_height">20sp</dimen>

+1 −0
Original line number Diff line number Diff line
@@ -3519,6 +3519,7 @@
  <java-symbol type="dimen" name="notification_messaging_spacing_conversation_group" />

  <java-symbol type="dimen" name="notification_text_margin_top" />
  <java-symbol type="dimen" name="notification_2025_text_margin_top" />
  <java-symbol type="dimen" name="notification_inbox_item_top_padding" />

  <!-- WallpaperManager config -->