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

Commit 0f3f196a authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

[Notif redesign] Consolidate MessagingGroup

The icons and alignment for the old messaging style and the new
conversation style are no longer different, so we don't need to override
things in MessagingGroup based on whether it's in a conversation or not.

Bug: 378660052
Test: visual test, screenshot tests to come later
Flag: android.app.notifications_redesign_templates
Change-Id: Ic25829bcc8120762621065fab37a10808eb2e7ec
parent 37507ae2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements
    private MessagingLinearLayout mMessageContainer;
    ImageFloatingTextView mSenderView;
    private ImageView mAvatarView;
    private View mAvatarContainer;
    private String mAvatarSymbol = "";
    private int mLayoutColor;
    private CharSequence mAvatarName = "";
@@ -717,6 +716,11 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements
     * @param isInConversation is this in a conversation
     */
    public void setIsInConversation(boolean isInConversation) {
        if (Flags.notificationsRedesignTemplates()) {
            // No alignment adjustments are necessary in the redesign, as the size of the icons
            // in both conversations and old messaging notifications are the same.
            return;
        }
        if (mIsInConversation != isInConversation) {
            mIsInConversation = isInConversation;
            MarginLayoutParams layoutParams =
+6 −6
Original line number Diff line number Diff line
@@ -24,13 +24,13 @@
    android:orientation="horizontal" >
    <FrameLayout
        android:id="@+id/message_icon_container"
        android:layout_width="@dimen/conversation_content_start"
        android:layout_width="@dimen/notification_2025_content_margin_start"
        android:layout_height="wrap_content">
        <ImageView
            android:layout_gravity="top|center_horizontal"
            android:id="@+id/message_icon"
            android:layout_width="@dimen/messaging_avatar_size"
            android:layout_height="@dimen/messaging_avatar_size"
            android:layout_width="@dimen/notification_2025_icon_circle_size"
            android:layout_height="@dimen/notification_2025_icon_circle_size"
            android:background="@drawable/notification_icon_circle"
            android:clipToOutline="true"
            android:scaleType="centerCrop"
@@ -58,14 +58,14 @@
    </com.android.internal.widget.RemeasuringLinearLayout>
    <FrameLayout
        android:id="@+id/messaging_group_icon_container"
        android:layout_width="@dimen/messaging_avatar_size"
        android:layout_height="@dimen/messaging_avatar_size"
        android:layout_width="@dimen/notification_2025_icon_circle_size"
        android:layout_height="@dimen/notification_2025_icon_circle_size"
        android:layout_marginStart="12dp"
        android:visibility="gone"/>
    <FrameLayout
        android:id="@+id/messaging_group_sending_progress_container"
        android:layout_width="@dimen/messaging_group_sending_progress_size"
        android:layout_height="@dimen/messaging_avatar_size"
        android:layout_height="@dimen/notification_2025_icon_circle_size"
        android:layout_marginStart="12dp"
        android:layout_gravity="top"
        android:visibility="gone">