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

Commit 80a1f351 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

[Notif redesign] Update size of top line icons

Increase the size of the icons slightly to match the spec, and make sure
it actually scales with the font size rather than being fixed.

Note that notification_2025_top_line_views is a fork of
notifications_top_line_views.

Bug: 378660052
Fix: 384068957
Test: tested manually, screenshot tests to come later
Flag: android.app.notifications_redesign_templates
Change-Id: I9244e3e9ad62bd89129abd009e5641f71260ec27
parent 4b359dfe
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5855,7 +5855,9 @@ public class Notification implements Parcelable
                return null;
            }
            final int size = mContext.getResources().getDimensionPixelSize(
                    R.dimen.notification_badge_size);
                    Flags.notificationsRedesignTemplates()
                            ? R.dimen.notification_2025_badge_size
                            : R.dimen.notification_badge_size);
            Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
            Canvas canvas = new Canvas(bitmap);
            badge.setBounds(0, 0, size, size);
+12 −12
Original line number Diff line number Diff line
@@ -136,10 +136,10 @@

    <ImageView
        android:id="@+id/phishing_alert"
        android:layout_width="@dimen/notification_phishing_alert_size"
        android:layout_height="@dimen/notification_phishing_alert_size"
        android:layout_marginStart="@dimen/notification_conversation_header_separating_margin"
        android:baseline="10dp"
        android:layout_width="@dimen/notification_2025_badge_size"
        android:layout_height="@dimen/notification_2025_badge_size"
        android:layout_marginStart="@dimen/notification_2025_badge_margin"
        android:baseline="@dimen/notification_2025_badge_baseline"
        android:scaleType="fitCenter"
        android:src="@drawable/ic_dialog_alert_material"
        android:visibility="gone"
@@ -148,10 +148,10 @@

    <ImageView
        android:id="@+id/profile_badge"
        android:layout_width="@dimen/notification_badge_size"
        android:layout_height="@dimen/notification_badge_size"
        android:layout_marginStart="@dimen/notification_conversation_header_separating_margin"
        android:baseline="10dp"
        android:layout_width="@dimen/notification_2025_badge_size"
        android:layout_height="@dimen/notification_2025_badge_size"
        android:layout_marginStart="@dimen/notification_2025_badge_margin"
        android:baseline="@dimen/notification_2025_badge_baseline"
        android:scaleType="fitCenter"
        android:visibility="gone"
        android:contentDescription="@string/notification_work_profile_content_description"
@@ -159,10 +159,10 @@

    <ImageView
        android:id="@+id/alerted_icon"
        android:layout_width="@dimen/notification_alerted_size"
        android:layout_height="@dimen/notification_alerted_size"
        android:layout_marginStart="@dimen/notification_conversation_header_separating_margin"
        android:baseline="10dp"
        android:layout_width="@dimen/notification_2025_badge_size"
        android:layout_height="@dimen/notification_2025_badge_size"
        android:layout_marginStart="@dimen/notification_2025_badge_margin"
        android:baseline="@dimen/notification_2025_badge_baseline"
        android:contentDescription="@string/notification_alerted_content_description"
        android:scaleType="fitCenter"
        android:src="@drawable/ic_notifications_alerted"
+2 −2
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@
                >

                <!--
                NOTE: The notification_top_line_views layout contains the app_name_text.
                NOTE: The notification_2025_top_line_views layout contains the app_name_text.
                In order to include the title view at the beginning, the Notification.Builder
                has logic to hide that view whenever this title view is to be visible.
                -->
@@ -104,7 +104,7 @@
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                    />

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

            </NotificationTopLineView>

+2 −2
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@
                >

                <!--
                NOTE: The notification_top_line_views layout contains the app_name_text.
                NOTE: The notification_2025_top_line_views layout contains the app_name_text.
                In order to include the title view at the beginning, the Notification.Builder
                has logic to hide that view whenever this title view is to be visible.
                -->
@@ -106,7 +106,7 @@
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                    />

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

            </NotificationTopLineView>

+2 −2
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@
                        >

                        <!--
                        NOTE: The notification_top_line_views layout contains the app_name_text.
                        NOTE: The notification_2025_top_line_views layout contains the app_name_text.
                        In order to include the title view at the beginning, the Notification.Builder
                        has logic to hide that view whenever this title view is to be visible.
                        -->
@@ -132,7 +132,7 @@
                            android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
                            />

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

                    </NotificationTopLineView>

Loading