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

Commit 8cd34aa2 authored by Shuming Hao's avatar Shuming Hao
Browse files

Add close button in conversation notifications

This CL adds close/dismiss button in the upper right corner of conversation notifications. This feature can be enabled through config, and will be most useful for mouse and touchpad users.

Bug: 344681642
Test: manual with Notify1

Change-Id: Ia297951fd4eb8a2568bef92d138ea4ef1e1e4d85
(cherry picked from commit 7c2eb2dbbfcfd44056b8820de23d8c341bdd0312)
parent 0ca9aab2
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -107,13 +107,20 @@
        >
        <!--expand_button_container is dynamically placed between here and at the end of the
        layout. It starts here since only FrameLayout layout params have gravity-->
        <FrameLayout
        <LinearLayout
            android:id="@+id/expand_button_container"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="end|top"
            android:clipChildren="false"
            android:clipToPadding="false">
            android:clipToPadding="false"
            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"
                />
            <!--expand_button_touch_container makes sure that we can nicely center the expand
            content in the collapsed layout while the parent makes sure that we're never laid out
            bigger than the messaging content.-->
@@ -145,6 +152,6 @@
                    android:layout_gravity="center"
                    />
            </LinearLayout>
        </FrameLayout>
        </LinearLayout>
    </FrameLayout>
</com.android.internal.widget.ConversationLayout>