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

Commit 514b52c0 authored by Selim Cinek's avatar Selim Cinek Committed by Steve Elliott
Browse files

Made image messages display externally in the layout

Previously image messages were embedded in the
messaging list instead of at the root.
Also rendering the images slightly differently such that
they don't always use the aspect ratio but can scale

Bug: 150905003
Test: add messaging layout with image, observe nice display
Change-Id: Iba25a1f81d77b58bfccbe2f9b8dfc502fdf8bdd4
parent a7aededa
Loading
Loading
Loading
Loading
+59 −14
Original line number Original line Diff line number Diff line
@@ -16,6 +16,9 @@


package com.android.internal.widget;
package com.android.internal.widget;


import static com.android.internal.widget.MessagingGroup.IMAGE_DISPLAY_LOCATION_EXTERNAL;
import static com.android.internal.widget.MessagingGroup.IMAGE_DISPLAY_LOCATION_INLINE;

import android.annotation.AttrRes;
import android.annotation.AttrRes;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
@@ -35,6 +38,7 @@ import android.os.Bundle;
import android.os.Parcelable;
import android.os.Parcelable;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.AttributeSet;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.Gravity;
@@ -46,6 +50,7 @@ import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
import android.view.animation.PathInterpolator;
import android.widget.FrameLayout;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RemoteViews;
import android.widget.RemoteViews;
import android.widget.TextView;
import android.widget.TextView;


@@ -109,13 +114,13 @@ public class ConversationLayout extends FrameLayout
    private View mExpandButtonContainer;
    private View mExpandButtonContainer;
    private ViewGroup mExpandButtonAndContentContainer;
    private ViewGroup mExpandButtonAndContentContainer;
    private NotificationExpandButton mExpandButton;
    private NotificationExpandButton mExpandButton;
    private MessagingLinearLayout mImageMessageContainer;
    private int mExpandButtonExpandedTopMargin;
    private int mExpandButtonExpandedTopMargin;
    private int mBadgedSideMargins;
    private int mBadgedSideMargins;
    private int mIconSizeBadged;
    private int mIconSizeBadged;
    private int mIconSizeCentered;
    private int mIconSizeCentered;
    private CachingIconView mIcon;
    private CachingIconView mIcon;
    private int mExpandedGroupTopMargin;
    private int mExpandedGroupTopMargin;
    private int mExpandButtonExpandedSize;
    private View mConversationFacePile;
    private View mConversationFacePile;
    private int mNotificationBackgroundColor;
    private int mNotificationBackgroundColor;
    private CharSequence mFallbackChatName;
    private CharSequence mFallbackChatName;
@@ -126,6 +131,7 @@ public class ConversationLayout extends FrameLayout
    private View mContentContainer;
    private View mContentContainer;
    private boolean mExpandable = true;
    private boolean mExpandable = true;
    private int mContentMarginEnd;
    private int mContentMarginEnd;
    private Rect mMessagingClipRect;


    public ConversationLayout(@NonNull Context context) {
    public ConversationLayout(@NonNull Context context) {
        super(context);
        super(context);
@@ -150,12 +156,13 @@ public class ConversationLayout extends FrameLayout
        super.onFinishInflate();
        super.onFinishInflate();
        mMessagingLinearLayout = findViewById(R.id.notification_messaging);
        mMessagingLinearLayout = findViewById(R.id.notification_messaging);
        mMessagingLinearLayout.setMessagingLayout(this);
        mMessagingLinearLayout.setMessagingLayout(this);
        mImageMessageContainer = findViewById(R.id.conversation_image_message_container);
        // We still want to clip, but only on the top, since views can temporarily out of bounds
        // We still want to clip, but only on the top, since views can temporarily out of bounds
        // during transitions.
        // during transitions.
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        int size = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
        int size = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
        Rect rect = new Rect(0, 0, size, size);
        mMessagingClipRect = new Rect(0, 0, size, size);
        mMessagingLinearLayout.setClipBounds(rect);
        setMessagingClippingDisabled(false);
        mTitleView = findViewById(R.id.title);
        mTitleView = findViewById(R.id.title);
        mAvatarSize = getResources().getDimensionPixelSize(R.dimen.messaging_avatar_size);
        mAvatarSize = getResources().getDimensionPixelSize(R.dimen.messaging_avatar_size);
        mTextPaint.setTextAlign(Paint.Align.CENTER);
        mTextPaint.setTextAlign(Paint.Align.CENTER);
@@ -176,8 +183,6 @@ public class ConversationLayout extends FrameLayout
        mExpandButton = findViewById(R.id.expand_button);
        mExpandButton = findViewById(R.id.expand_button);
        mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize(
        mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize(
                R.dimen.conversation_expand_button_top_margin_expanded);
                R.dimen.conversation_expand_button_top_margin_expanded);
        mExpandButtonExpandedSize = getResources().getDimensionPixelSize(
                R.dimen.conversation_expand_button_expanded_size);
        mNotificationHeaderExpandedPadding = getResources().getDimensionPixelSize(
        mNotificationHeaderExpandedPadding = getResources().getDimensionPixelSize(
                R.dimen.conversation_header_expanded_padding_end);
                R.dimen.conversation_header_expanded_padding_end);
        mContentMarginEnd = getResources().getDimensionPixelSize(
        mContentMarginEnd = getResources().getDimensionPixelSize(
@@ -370,6 +375,41 @@ public class ConversationLayout extends FrameLayout
            messagingGroup.setCanHideSenderIfFirst(canHide);
            messagingGroup.setCanHideSenderIfFirst(canHide);
        }
        }
        updateIconPositionAndSize();
        updateIconPositionAndSize();
        updateImageMessages();
    }

    private void updateImageMessages() {
        boolean displayExternalImage = false;
        ArraySet<View> newMessages = new ArraySet<>();
        if (mIsCollapsed) {

            // When collapsed, we're displaying all image messages in a dedicated container
            // on the right of the layout instead of inline. Let's add all isolated images there
            int imageIndex = 0;
            for (int i = 0; i < mGroups.size(); i++) {
                MessagingGroup messagingGroup = mGroups.get(i);
                MessagingImageMessage isolatedMessage = messagingGroup.getIsolatedMessage();
                if (isolatedMessage != null) {
                    newMessages.add(isolatedMessage.getView());
                    displayExternalImage = true;
                    if (imageIndex
                            != mImageMessageContainer.indexOfChild(isolatedMessage.getView())) {
                        mImageMessageContainer.removeView(isolatedMessage.getView());
                        mImageMessageContainer.addView(isolatedMessage.getView(), imageIndex);
                    }
                    imageIndex++;
                }
            }
        }
        // Remove all messages that don't belong into the image layout
        for (int i = 0; i < mImageMessageContainer.getChildCount(); i++) {
            View child = mImageMessageContainer.getChildAt(i);
            if (!newMessages.contains(child)) {
                mImageMessageContainer.removeView(child);
                i--;
            }
        }
        mImageMessageContainer.setVisibility(displayExternalImage ? VISIBLE : GONE);
    }
    }


    private void bindFacePile() {
    private void bindFacePile() {
@@ -662,7 +702,9 @@ public class ConversationLayout extends FrameLayout
                newGroup = MessagingGroup.createGroup(mMessagingLinearLayout);
                newGroup = MessagingGroup.createGroup(mMessagingLinearLayout);
                mAddedGroups.add(newGroup);
                mAddedGroups.add(newGroup);
            }
            }
            newGroup.setDisplayImagesAtEnd(mIsCollapsed);
            newGroup.setImageDisplayLocation(mIsCollapsed
                    ? IMAGE_DISPLAY_LOCATION_EXTERNAL
                    : IMAGE_DISPLAY_LOCATION_INLINE);
            newGroup.setIsInConversation(true);
            newGroup.setIsInConversation(true);
            newGroup.setLayoutColor(mLayoutColor);
            newGroup.setLayoutColor(mLayoutColor);
            newGroup.setTextColors(mSenderTextColor, mMessageTextColor);
            newGroup.setTextColors(mSenderTextColor, mMessageTextColor);
@@ -817,6 +859,10 @@ public class ConversationLayout extends FrameLayout
        return mMessagingLinearLayout;
        return mMessagingLinearLayout;
    }
    }


    public @NonNull ViewGroup getImageMessageContainer() {
        return mImageMessageContainer;
    }

    public ArrayList<MessagingGroup> getMessagingGroups() {
    public ArrayList<MessagingGroup> getMessagingGroups() {
        return mGroups;
        return mGroups;
    }
    }
@@ -827,20 +873,17 @@ public class ConversationLayout extends FrameLayout
        int gravity;
        int gravity;
        int topMargin = 0;
        int topMargin = 0;
        ViewGroup newContainer;
        ViewGroup newContainer;
        int newContainerHeight;
        if (mIsCollapsed) {
        if (mIsCollapsed) {
            drawableId = R.drawable.ic_expand_notification;
            drawableId = R.drawable.ic_expand_notification;
            contentDescriptionId = R.string.expand_button_content_description_collapsed;
            contentDescriptionId = R.string.expand_button_content_description_collapsed;
            gravity = Gravity.CENTER;
            gravity = Gravity.CENTER;
            newContainer = mExpandButtonAndContentContainer;
            newContainer = mExpandButtonAndContentContainer;
            newContainerHeight = LayoutParams.MATCH_PARENT;
        } else {
        } else {
            drawableId = R.drawable.ic_collapse_notification;
            drawableId = R.drawable.ic_collapse_notification;
            contentDescriptionId = R.string.expand_button_content_description_expanded;
            contentDescriptionId = R.string.expand_button_content_description_expanded;
            gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
            gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
            topMargin = mExpandButtonExpandedTopMargin;
            topMargin = mExpandButtonExpandedTopMargin;
            newContainer = this;
            newContainer = this;
            newContainerHeight = mExpandButtonExpandedSize;
        }
        }
        mExpandButton.setImageDrawable(getContext().getDrawable(drawableId));
        mExpandButton.setImageDrawable(getContext().getDrawable(drawableId));
        mExpandButton.setColorFilter(mExpandButton.getOriginalNotificationColor());
        mExpandButton.setColorFilter(mExpandButton.getOriginalNotificationColor());
@@ -850,14 +893,11 @@ public class ConversationLayout extends FrameLayout
        if (newContainer != mExpandButtonContainer.getParent()) {
        if (newContainer != mExpandButtonContainer.getParent()) {
            ((ViewGroup) mExpandButtonContainer.getParent()).removeView(mExpandButtonContainer);
            ((ViewGroup) mExpandButtonContainer.getParent()).removeView(mExpandButtonContainer);
            newContainer.addView(mExpandButtonContainer);
            newContainer.addView(mExpandButtonContainer);
            MarginLayoutParams layoutParams =
                    (MarginLayoutParams) mExpandButtonContainer.getLayoutParams();
            layoutParams.height = newContainerHeight;
            mExpandButtonContainer.setLayoutParams(layoutParams);
        }
        }


        // update if the expand button is centered
        // update if the expand button is centered
        FrameLayout.LayoutParams layoutParams = (LayoutParams) mExpandButton.getLayoutParams();
        LinearLayout.LayoutParams layoutParams =
                (LinearLayout.LayoutParams) mExpandButton.getLayoutParams();
        layoutParams.gravity = gravity;
        layoutParams.gravity = gravity;
        layoutParams.topMargin = topMargin;
        layoutParams.topMargin = topMargin;
        mExpandButton.setLayoutParams(layoutParams);
        mExpandButton.setLayoutParams(layoutParams);
@@ -905,4 +945,9 @@ public class ConversationLayout extends FrameLayout
        }
        }
        updateContentPaddings();
        updateContentPaddings();
    }
    }

    @Override
    public void setMessagingClippingDisabled(boolean clippingDisabled) {
        mMessagingLinearLayout.setClipBounds(clippingDisabled ? null : mMessagingClipRect);
    }
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -39,4 +39,9 @@ public interface IMessagingLayout {
     * @return the list of messaging groups
     * @return the list of messaging groups
     */
     */
    ArrayList<MessagingGroup> getMessagingGroups();
    ArrayList<MessagingGroup> getMessagingGroups();

    /**
     * Disable the clipping of the messaging container.
     */
    void setMessagingClippingDisabled(boolean clippingDisabled);
}
}
+40 −7
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.widget;
package com.android.internal.widget;


import android.annotation.AttrRes;
import android.annotation.AttrRes;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
import android.annotation.StyleRes;
import android.annotation.StyleRes;
@@ -44,6 +45,8 @@ import android.widget.RemoteViews;


import com.android.internal.R;
import com.android.internal.R;


import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.ArrayList;
import java.util.List;
import java.util.List;


@@ -54,6 +57,23 @@ import java.util.List;
public class MessagingGroup extends LinearLayout implements MessagingLinearLayout.MessagingChild {
public class MessagingGroup extends LinearLayout implements MessagingLinearLayout.MessagingChild {
    private static Pools.SimplePool<MessagingGroup> sInstancePool
    private static Pools.SimplePool<MessagingGroup> sInstancePool
            = new Pools.SynchronizedPool<>(10);
            = new Pools.SynchronizedPool<>(10);

    /**
     * Images are displayed inline.
     */
    public static final int IMAGE_DISPLAY_LOCATION_INLINE = 0;

    /**
     * Images are displayed at the end of the group.
     */
    public static final int IMAGE_DISPLAY_LOCATION_AT_END = 1;

    /**
     *     Images are displayed externally.
     */
    public static final int IMAGE_DISPLAY_LOCATION_EXTERNAL = 2;


    private MessagingLinearLayout mMessageContainer;
    private MessagingLinearLayout mMessageContainer;
    ImageFloatingTextView mSenderView;
    ImageFloatingTextView mSenderView;
    private ImageView mAvatarView;
    private ImageView mAvatarView;
@@ -70,7 +90,7 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
    private boolean mIsHidingAnimated;
    private boolean mIsHidingAnimated;
    private boolean mNeedsGeneratedAvatar;
    private boolean mNeedsGeneratedAvatar;
    private Person mSender;
    private Person mSender;
    private boolean mImagesAtEnd;
    private @ImageDisplayLocation int mImageDisplayLocation;
    private ViewGroup mImageContainer;
    private ViewGroup mImageContainer;
    private MessagingImageMessage mIsolatedMessage;
    private MessagingImageMessage mIsolatedMessage;
    private boolean mClippingDisabled;
    private boolean mClippingDisabled;
@@ -476,7 +496,7 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
                mAddedMessages.add(message);
                mAddedMessages.add(message);
            }
            }
            boolean isImage = message instanceof MessagingImageMessage;
            boolean isImage = message instanceof MessagingImageMessage;
            if (mImagesAtEnd && isImage) {
            if (mImageDisplayLocation != IMAGE_DISPLAY_LOCATION_INLINE && isImage) {
                isolatedMessage = (MessagingImageMessage) message;
                isolatedMessage = (MessagingImageMessage) message;
            } else {
            } else {
                if (removeFromParentIfDifferent(message, mMessageContainer)) {
                if (removeFromParentIfDifferent(message, mMessageContainer)) {
@@ -500,9 +520,12 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
            }
            }
        }
        }
        if (isolatedMessage != null) {
        if (isolatedMessage != null) {
            if (removeFromParentIfDifferent(isolatedMessage, mImageContainer)) {
            if (mImageDisplayLocation == IMAGE_DISPLAY_LOCATION_AT_END
                    && removeFromParentIfDifferent(isolatedMessage, mImageContainer)) {
                mImageContainer.removeAllViews();
                mImageContainer.removeAllViews();
                mImageContainer.addView(isolatedMessage.getView());
                mImageContainer.addView(isolatedMessage.getView());
            } else if (mImageDisplayLocation == IMAGE_DISPLAY_LOCATION_EXTERNAL) {
                mImageContainer.removeAllViews();
            }
            }
            isolatedMessage.setIsolated(true);
            isolatedMessage.setIsolated(true);
        } else if (mIsolatedMessage != null) {
        } else if (mIsolatedMessage != null) {
@@ -515,7 +538,8 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
    }
    }


    private void updateImageContainerVisibility() {
    private void updateImageContainerVisibility() {
        mImageContainer.setVisibility(mIsolatedMessage != null && mImagesAtEnd
        mImageContainer.setVisibility(mIsolatedMessage != null
                && mImageDisplayLocation == IMAGE_DISPLAY_LOCATION_AT_END
                ? View.VISIBLE : View.GONE);
                ? View.VISIBLE : View.GONE);
    }
    }


@@ -620,9 +644,9 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
        mClippingDisabled = disabled;
        mClippingDisabled = disabled;
    }
    }


    public void setDisplayImagesAtEnd(boolean atEnd) {
    public void setImageDisplayLocation(@ImageDisplayLocation int displayLocation) {
        if (mImagesAtEnd != atEnd) {
        if (mImageDisplayLocation != displayLocation) {
            mImagesAtEnd = atEnd;
            mImageDisplayLocation = displayLocation;
            updateImageContainerVisibility();
            updateImageContainerVisibility();
        }
        }
    }
    }
@@ -670,4 +694,13 @@ public class MessagingGroup extends LinearLayout implements MessagingLinearLayou
            mMessagingIconContainer.setLayoutParams(layoutParams);
            mMessagingIconContainer.setLayoutParams(layoutParams);
        }
        }
    }
    }

    @IntDef(prefix = {"IMAGE_DISPLAY_LOCATION_"}, value = {
            IMAGE_DISPLAY_LOCATION_INLINE,
            IMAGE_DISPLAY_LOCATION_AT_END,
            IMAGE_DISPLAY_LOCATION_EXTERNAL
    })
    @Retention(RetentionPolicy.SOURCE)
    private @interface ImageDisplayLocation {
    }
}
}
+19 −11
Original line number Original line Diff line number Diff line
@@ -149,10 +149,16 @@ public class MessagingImageMessage extends ImageView implements MessagingMessage
    protected void onDraw(Canvas canvas) {
    protected void onDraw(Canvas canvas) {
        canvas.save();
        canvas.save();
        canvas.clipPath(getRoundedRectPath());
        canvas.clipPath(getRoundedRectPath());
        int width = (int) Math.max(getActualWidth(), getActualHeight() * mAspectRatio);
        // Calculate the right sizing ensuring that the image is nicely centered in the layout
        int height = (int) (width / mAspectRatio);
        // during transitions
        int width = (int) Math.max((Math.min(getHeight(), getActualHeight()) * mAspectRatio),
                getActualWidth());
        int height = (int) Math.max((Math.min(getWidth(), getActualWidth()) / mAspectRatio),
                getActualHeight());
        height = (int) Math.max(height, width / mAspectRatio);
        int left = (int) ((getActualWidth() - width) / 2.0f);
        int left = (int) ((getActualWidth() - width) / 2.0f);
        mDrawable.setBounds(left, 0, left + width, height);
        int top = (int) ((getActualHeight() - height) / 2.0f);
        mDrawable.setBounds(left, top, left + width, top + height);
        mDrawable.draw(canvas);
        mDrawable.draw(canvas);
        canvas.restore();
        canvas.restore();
    }
    }
@@ -222,8 +228,17 @@ public class MessagingImageMessage extends ImageView implements MessagingMessage
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        if (mIsIsolated) {
        if (mIsIsolated) {
            // When isolated we have a fixed size, let's use that sizing.
            setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
            setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
                    MeasureSpec.getSize(heightMeasureSpec));
                    MeasureSpec.getSize(heightMeasureSpec));
        } else {
            // If we are displaying inline, we never want to go wider than actual size of the
            // image, otherwise it will look quite blurry.
            int width = Math.min(MeasureSpec.getSize(widthMeasureSpec),
                    mDrawable.getIntrinsicWidth());
            int height = (int) Math.min(MeasureSpec.getSize(heightMeasureSpec), width
                    / mAspectRatio);
            setMeasuredDimension(width, height);
        }
        }
    }
    }


@@ -231,7 +246,7 @@ public class MessagingImageMessage extends ImageView implements MessagingMessage
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        super.onLayout(changed, left, top, right, bottom);
        // TODO: ensure that this isn't called when transforming
        // TODO: ensure that this isn't called when transforming
        setActualWidth(getStaticWidth());
        setActualWidth(getWidth());
        setActualHeight(getHeight());
        setActualHeight(getHeight());
    }
    }


@@ -258,13 +273,6 @@ public class MessagingImageMessage extends ImageView implements MessagingMessage
        return mActualHeight;
        return mActualHeight;
    }
    }


    public int getStaticWidth() {
        if (mIsIsolated) {
            return getWidth();
        }
        return (int) (getHeight() * mAspectRatio);
    }

    public void setIsolated(boolean isolated) {
    public void setIsolated(boolean isolated) {
        if (mIsIsolated != isolated) {
        if (mIsIsolated != isolated) {
            mIsIsolated = isolated;
            mIsIsolated = isolated;
+11 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,9 @@


package com.android.internal.widget;
package com.android.internal.widget;


import static com.android.internal.widget.MessagingGroup.IMAGE_DISPLAY_LOCATION_AT_END;
import static com.android.internal.widget.MessagingGroup.IMAGE_DISPLAY_LOCATION_INLINE;

import android.annotation.AttrRes;
import android.annotation.AttrRes;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
@@ -447,7 +450,9 @@ public class MessagingLayout extends FrameLayout
                newGroup = MessagingGroup.createGroup(mMessagingLinearLayout);
                newGroup = MessagingGroup.createGroup(mMessagingLinearLayout);
                mAddedGroups.add(newGroup);
                mAddedGroups.add(newGroup);
            }
            }
            newGroup.setDisplayImagesAtEnd(mDisplayImagesAtEnd);
            newGroup.setImageDisplayLocation(mDisplayImagesAtEnd
                    ? IMAGE_DISPLAY_LOCATION_AT_END
                    : IMAGE_DISPLAY_LOCATION_INLINE);
            newGroup.setIsInConversation(false);
            newGroup.setIsInConversation(false);
            newGroup.setLayoutColor(mLayoutColor);
            newGroup.setLayoutColor(mLayoutColor);
            newGroup.setTextColors(mSenderTextColor, mMessageTextColor);
            newGroup.setTextColors(mSenderTextColor, mMessageTextColor);
@@ -599,4 +604,9 @@ public class MessagingLayout extends FrameLayout
    public ArrayList<MessagingGroup> getMessagingGroups() {
    public ArrayList<MessagingGroup> getMessagingGroups() {
        return mGroups;
        return mGroups;
    }
    }

    @Override
    public void setMessagingClippingDisabled(boolean clippingDisabled) {
        // Don't do anything, this is only used for the ConversationLayout
    }
}
}
Loading