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

Commit 5cd46812 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Revert media notifications to their previous style."

parents 0deba940 cedb7699
Loading
Loading
Loading
Loading
+43 −3
Original line number Diff line number Diff line
@@ -50,16 +50,56 @@
            android:id="@+id/notification_main_column"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/notification_content_margin_top"
            android:layout_marginTop="46dp"
            android:layout_marginStart="@dimen/notification_content_margin_start"
            android:layout_marginBottom="@dimen/notification_content_margin"
            android:layout_marginEnd="@dimen/notification_content_margin_end"
            android:orientation="vertical"
            >
            <!-- TODO(b/172652345): fix the media style -->
            <!--<include layout="@layout/notification_template_part_line1"/>-->
            <!--<include layout="@layout/notification_template_text"/>-->

            <include layout="@layout/notification_template_part_line1" />
            <LinearLayout
                android:id="@+id/line1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                >
                <TextView android:id="@+id/title"
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:singleLine="true"
                    android:ellipsize="marquee"
                    android:fadingEdge="horizontal"
                    android:textAlignment="viewStart"
                    />
                <TextView android:id="@+id/text_line_1"
                    style="@style/Widget.DeviceDefault.Notification.Text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="end|bottom"
                    android:layout_marginStart="16dp"
                    android:singleLine="true"
                    android:ellipsize="marquee"
                    android:fadingEdge="horizontal"
                    />
            </LinearLayout>

            <include layout="@layout/notification_template_text" />
            <com.android.internal.widget.ImageFloatingTextView
                style="@style/Widget.DeviceDefault.Notification.Text"
                android:id="@+id/text"
                android:layout_width="match_parent"
                android:layout_height="@dimen/notification_text_height"
                android:layout_gravity="top"
                android:layout_marginTop="0.5dp"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"
                android:gravity="top"
                android:singleLine="true"
                android:textAlignment="viewStart"
                />
        </LinearLayout>

        <LinearLayout
+45 −3
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginStart="@dimen/notification_content_margin_start"
            android:layout_marginTop="@dimen/notification_content_margin_top"
            android:layout_marginTop="46dp"
            android:layout_alignParentTop="true"
            android:tag="media"
            >
@@ -58,8 +58,50 @@
                android:paddingBottom="@dimen/notification_content_margin"
                android:orientation="vertical"
                >
                <include layout="@layout/notification_template_part_line1"/>
                <include layout="@layout/notification_template_text"/>
                <!-- TODO(b/172652345): fix the media style -->
                <!--<include layout="@layout/notification_template_part_line1"/>-->
                <!--<include layout="@layout/notification_template_text"/>-->

                <LinearLayout
                    android:id="@+id/line1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    >
                    <TextView android:id="@+id/title"
                        android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:singleLine="true"
                        android:ellipsize="marquee"
                        android:fadingEdge="horizontal"
                        android:textAlignment="viewStart"
                        />
                    <TextView android:id="@+id/text_line_1"
                        style="@style/Widget.DeviceDefault.Notification.Text"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="end|bottom"
                        android:layout_marginStart="16dp"
                        android:singleLine="true"
                        android:ellipsize="marquee"
                        android:fadingEdge="horizontal"
                        />
                </LinearLayout>

                <com.android.internal.widget.ImageFloatingTextView
                    style="@style/Widget.DeviceDefault.Notification.Text"
                    android:id="@+id/text"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/notification_text_height"
                    android:layout_gravity="top"
                    android:layout_marginTop="0.5dp"
                    android:ellipsize="marquee"
                    android:fadingEdge="horizontal"
                    android:gravity="top"
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                    />
            </LinearLayout>
            <LinearLayout
                android:id="@+id/media_actions"
+6 −2
Original line number Diff line number Diff line
@@ -666,8 +666,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            } else {
                smallHeight = mMaxSmallHeightBeforeS;
            }
        } else if (isMediaLayout && showCompactMediaSeekbar) {
            smallHeight = mMaxSmallHeightMedia;
        } else if (isMediaLayout) {
            // TODO(b/172652345): MediaStyle notifications currently look broken when we enforce
            //  the standard notification height, so we have to afford them more vertical space to
            //  make sure we don't crop them terribly.  We actually need to revisit this and give
            //  them a headerless design, then remove this hack.
            smallHeight = showCompactMediaSeekbar ? mMaxSmallHeightMedia : mMaxSmallHeightBeforeS;
        } else if (isMessagingLayout) {
            // TODO(b/173204301): MessagingStyle notifications currently look broken when we enforce
            //  the standard notification height, so we have to afford them more vertical space to