Skip to content

Commit

Permalink
Clone overflow spannable in attempt to reduce flickering.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal authored and cody-signal committed Dec 19, 2023
1 parent f2707d0 commit a829165
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private void ellipsizeEmojiTextForMaxLines() {
}

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);

Expand Down

0 comments on commit a829165

Please sign in to comment.