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

Commit 477d918b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Notif redesign] Use circular bg for left icon in messaging notifs" into main

parents a3ae12f5 95804578
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -209,6 +209,15 @@ public class ConversationLayout extends FrameLayout
        mImportanceRingView = findViewById(R.id.conversation_icon_badge_ring);
        mConversationIconBadge = findViewById(R.id.conversation_icon_badge);
        mConversationIconBadgeBg = findViewById(R.id.conversation_icon_badge_bg);
        if (notificationsRedesignTemplates()) {
            // The left_icon in the header has the default rounded square background. Make sure
            // we're using the circular background instead.
            ImageView leftIcon = findViewById(R.id.left_icon);
            if (leftIcon != null) {
                leftIcon.setBackgroundResource(
                        R.drawable.notification_2025_conversation_icon_background);
            }
        }
        mIcon.setOnVisibilityChangedListener((visibility) -> {

            // Let's hide the background directly or in an animated way
+9 −0
Original line number Diff line number Diff line
@@ -120,6 +120,15 @@ public class MessagingLayout extends FrameLayout
        mImageMessageContainer = findViewById(R.id.conversation_image_message_container);
        mRightIconView = findViewById(R.id.right_icon);
        mExpandButton = findViewById(R.id.expand_button);
        if (notificationsRedesignTemplates()) {
            // The left_icon in the header has the default rounded square background. Make sure
            // we're using the circular background instead.
            ImageView leftIcon = findViewById(R.id.left_icon);
            if (leftIcon != null) {
                leftIcon.setBackgroundResource(
                        R.drawable.notification_2025_conversation_icon_background);
            }
        }
        // We still want to clip, but only on the top, since views can temporarily out of bounds
        // during transitions.
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@
                android:layout_height="@dimen/notification_2025_left_icon_size"
                android:layout_alignParentStart="true"
                android:layout_margin="@dimen/notification_2025_margin"
                android:background="@drawable/notification_large_icon_outline"
                android:background="@drawable/notification_2025_conversation_icon_background"
                android:clipToOutline="true"
                android:importantForAccessibility="no"
                android:scaleType="centerCrop"
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
                android:layout_height="@dimen/notification_2025_left_icon_size"
                android:layout_alignParentStart="true"
                android:layout_margin="@dimen/notification_2025_margin"
                android:background="@drawable/notification_large_icon_outline"
                android:background="@drawable/notification_2025_conversation_icon_background"
                android:clipToOutline="true"
                android:importantForAccessibility="no"
                android:scaleType="centerCrop"
+1 −0
Original line number Diff line number Diff line
@@ -4233,6 +4233,7 @@
  <java-symbol type="id" name="snooze_button" />
  <java-symbol type="dimen" name="text_size_body_2_material" />
  <java-symbol type="dimen" name="notification_icon_circle_size" />
  <java-symbol type="drawable" name="notification_2025_conversation_icon_background" />
  <java-symbol type="drawable" name="notification_icon_circle" />
  <java-symbol type="drawable" name="notification_progress_icon_background" />
  <java-symbol type="dimen" name="messaging_avatar_size" />
Loading