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

Commit 563fa055 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Set max width on sender/group name too" into rvc-dev am:...

Merge "Merge "Set max width on sender/group name too" into rvc-dev am: 0d07c9ac am: 6a68dfc8 am: c161165f" into rvc-qpr-dev-plus-aosp
parents 3460336a 6ca46183
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
                android:layout_height="wrap_content"
                android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
                android:maxLines="1"
                android:ellipsize="end"
                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"/>

            <TextView
@@ -55,6 +56,7 @@
                android:layout_height="wrap_content"
                android:fontFamily="@*android:string/config_bodyFontFamily"
                android:maxLines="2"
                android:ellipsize="end"
                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"/>

        </LinearLayout>
+5 −2
Original line number Diff line number Diff line
@@ -230,8 +230,12 @@ public class BubbleFlyoutView extends FrameLayout {
            mSenderText.setTranslationX(0);
        }

        final int maxTextViewWidth =
                (int) (parentWidth * FLYOUT_MAX_WIDTH_PERCENT) - mFlyoutPadding * 2;

        // Name visibility
        if (!TextUtils.isEmpty(flyoutMessage.senderName)) {
            mSenderText.setMaxWidth(maxTextViewWidth);
            mSenderText.setText(flyoutMessage.senderName);
            mSenderText.setVisibility(VISIBLE);
        } else {
@@ -248,8 +252,7 @@ public class BubbleFlyoutView extends FrameLayout {
        // Set the flyout TextView's max width in terms of percent, and then subtract out the
        // padding so that the entire flyout view will be the desired width (rather than the
        // TextView being the desired width + extra padding).
        mMessageText.setMaxWidth(
                (int) (parentWidth * FLYOUT_MAX_WIDTH_PERCENT) - mFlyoutPadding * 2);
        mMessageText.setMaxWidth(maxTextViewWidth);
        mMessageText.setText(flyoutMessage.message);

        // Wait for the TextView to lay out so we know its line count.