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

Commit 877c9060 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

[Notif redesign] Align actions in old media notif

This aligns the play/pause etc actions in the old-style media
notification with the rest of the content in most cases, given the new
larger "small" icon.

Bug: 378660052
Test: visual test, screenshot tests to come later
Flag: android.app.notifications_redesign_templates
Change-Id: I9582e490b82ce3e38c42ce898034a53def96b277
parent 62c9bc2f
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -51,13 +51,9 @@
        <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="38dp"
            android:layout_marginStart="@dimen/notification_2025_media_actions_margin_start"
            android:minHeight="@dimen/notification_content_margin"
            >
            <!-- The layout_marginStart is selected to ensure that action icons which are visually
                 12x12 in a 24x24 drawable will align correctly with the text.  This means that
                 stock media action icons will align, but icons may be visually up to 20x20 and
                 remain in-spec, in which case they will protrude into the column slightly. -->

            <!-- Nesting in FrameLayout is required to ensure that the marginStart actually applies
                 at the start instead of always the left, given that the media_actions LinearLayout
+7 −0
Original line number Diff line number Diff line
@@ -255,6 +255,13 @@
     This represents 16dp for the left margin + 40dp for the icon + 16dp for the right margin -->
    <dimen name="notification_2025_content_margin_start">72dp</dimen>

    <!-- The margin on the start of the media actions, selected to ensure that action icons which
     are visually 12x12 in a 24x24 drawable will align correctly with the text.  This means that
     stock media action icons will align, but icons may be visually up to 20x20 and remain in-spec,
     in which case they will protrude into the start column slightly.
     72dp (content margin) - 8dp (media action padding) - 6dp (visual padding within drawable) -->
    <dimen name="notification_2025_media_actions_margin_start">58dp</dimen>

    <!-- The margin on the end of most content views (ignores the expander) -->
    <dimen name="notification_content_margin_end">16dp</dimen>