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

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

Add dismiss button to new templates

The original templates were modified after the new ones were forked.
This should bring them back to parity.

See also I82e96c7e12d07929242e0c0033e8562cb58fbfd9 that this is based
on.

Bug: 378660052
Test: TBD
Flag: android.app.notifications_redesign_templates
Change-Id: I4f1a95d98268b4c07f43f0f28df7757122321c31
parent b41923ba
Loading
Loading
Loading
Loading
+14 −26
Original line number Diff line number Diff line
@@ -157,26 +157,10 @@
            android:maxDrawableHeight="@dimen/notification_right_icon_size"
            />

        <LinearLayout
            android:id="@+id/notification_buttons_column"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:orientation="vertical"
            >

            <include layout="@layout/notification_close_button"
                android:layout_width="@dimen/notification_close_button_size"
                android:layout_height="@dimen/notification_close_button_size"
                android:layout_gravity="end"
                android:layout_marginEnd="20dp"
                />

        <FrameLayout
            android:id="@+id/expand_button_touch_container"
            android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_weight="1"
            android:layout_height="match_parent"
            android:minWidth="@dimen/notification_content_margin_end"
            >

@@ -190,6 +174,10 @@

    </LinearLayout>

    </LinearLayout>
    <include layout="@layout/notification_close_button"
        android:id="@+id/close_button"
        android:layout_width="@dimen/notification_close_button_size"
        android:layout_height="@dimen/notification_close_button_size"
        android:layout_gravity="top|end" />

</FrameLayout>
+7 −0
Original line number Diff line number Diff line
@@ -194,4 +194,11 @@
        </FrameLayout>

    </LinearLayout>

    <include layout="@layout/notification_close_button"
        android:id="@+id/close_button"
        android:layout_width="@dimen/notification_close_button_size"
        android:layout_height="@dimen/notification_close_button_size"
        android:layout_gravity="top|end" />

</com.android.internal.widget.MediaNotificationView>
+6 −0
Original line number Diff line number Diff line
@@ -199,6 +199,12 @@

            </LinearLayout>

            <include layout="@layout/notification_close_button"
                android:id="@+id/close_button"
                android:layout_width="@dimen/notification_close_button_size"
                android:layout_height="@dimen/notification_close_button_size"
                android:layout_gravity="top|end" />

        </com.android.internal.widget.NotificationMaxHeightFrameLayout>

    <LinearLayout
+10 −21
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_centerVertical="true"
        android:layout_toStartOf="@id/notification_buttons_column"
        android:layout_toStartOf="@id/expand_button"
        android:layout_alignWithParentIfMissing="true"
        android:clipChildren="false"
        android:gravity="center_vertical"
@@ -81,28 +81,17 @@
        android:focusable="false"
        />

    <LinearLayout
        android:id="@+id/notification_buttons_column"
    <include layout="@layout/notification_expand_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:orientation="vertical"
        >
        android:layout_centerVertical="true"
        android:layout_alignParentEnd="true" />

    <include layout="@layout/notification_close_button"
        android:id="@+id/close_button"
        android:layout_width="@dimen/notification_close_button_size"
        android:layout_height="@dimen/notification_close_button_size"
            android:layout_gravity="end"
            android:layout_marginEnd="20dp"
            />

        <include layout="@layout/notification_expand_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            />

    </LinearLayout>
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true" />

</NotificationHeaderView>