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

Commit 613b67fa authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

[Notif redesign] Increase notification title size

Bug: 378660052
Test: visual test, screenshot tests to come later
Flag: android.app.notifications_redesign_templates
Change-Id: I551e201634b31c45e28d65d375b9d6c74b3fff41
parent 43311b49
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.widget.RemoteViews;
@@ -265,14 +266,20 @@ public class NotificationHeaderView extends RelativeLayout {
                ? R.style.TextAppearance_DeviceDefault_Notification_Title
                : R.style.TextAppearance_DeviceDefault_Notification_Info;
        // Most of the time, we're showing text in the minimized state
        View headerText = findViewById(R.id.header_text);
        if (headerText instanceof TextView) {
            ((TextView) headerText).setTextAppearance(styleResId);
        if (findViewById(R.id.header_text) instanceof TextView headerText) {
            headerText.setTextAppearance(styleResId);
            if (notificationsRedesignTemplates()) {
                // TODO: b/378660052 - When inlining the redesign flag, this should be updated
                //  directly in TextAppearance_DeviceDefault_Notification_Title so we won't need to
                //  override it here.
                float textSize = getContext().getResources().getDimension(
                        R.dimen.notification_2025_title_text_size);
                headerText.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
            }
        }
        // If there's no summary or text, we show the app name instead of nothing
        View appNameText = findViewById(R.id.app_name_text);
        if (appNameText instanceof TextView) {
            ((TextView) appNameText).setTextAppearance(styleResId);
        if (findViewById(R.id.app_name_text) instanceof TextView appNameText) {
            appNameText.setTextAppearance(styleResId);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
        android:textSize="16sp"
        android:textSize="@dimen/notification_2025_title_text_size"
        android:singleLine="true"
        android:layout_weight="1"
        />
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                    android:textSize="@dimen/notification_2025_title_text_size"
                    />

                <include layout="@layout/notification_2025_top_line_views" />
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                    android:textSize="@dimen/notification_2025_title_text_size"
                    />

                <include layout="@layout/notification_2025_top_line_views" />
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@
                            android:singleLine="true"
                            android:textAlignment="viewStart"
                            android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                            android:textSize="@dimen/notification_2025_title_text_size"
                            />

                        <include layout="@layout/notification_2025_top_line_views" />
Loading