Clone overflow spannable in attempt to reduce flickering.

This commit is contained in:
Alex Hart 2023-12-13 14:13:10 -04:00 committed by Cody Henthorne
parent f2707d053d
commit a829165f2d

View file

@ -355,7 +355,7 @@ public class EmojiTextView extends AppCompatTextView {
}
int overflowEnd = getLayout().getLineEnd(maxLines);
CharSequence overflow = getText().subSequence(overflowStart, overflowEnd);
CharSequence overflow = new SpannableString(getText().subSequence(overflowStart, overflowEnd).toString());
float adjust = overflowText != null ? getPaint().measureText(overflowText, 0, overflowText.length()) : 0f;
CharSequence ellipsized = TextUtils.ellipsize(overflow, getPaint(), getWidth() - adjust, TextUtils.TruncateAt.END);