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

Commit 61270679 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Increase text margin for expanded notifs

Fix: 433317586
Test: manual & screenshot tests
Flag: android.app.notifications_redesign_templates
Change-Id: I9c1f1e832bea2b9606eb8725850cf1ef1baa5d27
parent 0caaced7
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
@@ -3516,6 +3516,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 -->