mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-21 19:48:29 +00:00
Clone overflow spannable in attempt to reduce flickering.
This commit is contained in:
committed by
Cody Henthorne
parent
f2707d053d
commit
a829165f2d
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user