mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 06:02:22 +00:00
Render emoji's properly in quote bubbles.
Unfortunately, the change wasn't as simple as just switching to use our EmojiTextView. That view only supported single-line text. I added support for multi-line text. Fixes #7704.
This commit is contained in:
committed by
Moxie Marlinspike
parent
cbe394025d
commit
6fbbc9d078
@@ -28,9 +28,6 @@ import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.animation.FastOutSlowInInterpolator;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextUtils.TruncateAt;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -97,17 +94,6 @@ public class ViewUtil {
|
||||
parent.addView(toAdd, childIndex > -1 ? childIndex : defaultIndex);
|
||||
}
|
||||
|
||||
public static CharSequence ellipsize(@Nullable CharSequence text, @NonNull TextView view) {
|
||||
if (TextUtils.isEmpty(text) || view.getWidth() == 0 || view.getEllipsize() != TruncateAt.END) {
|
||||
return text;
|
||||
} else {
|
||||
return TextUtils.ellipsize(text,
|
||||
view.getPaint(),
|
||||
view.getWidth() - view.getPaddingRight() - view.getPaddingLeft(),
|
||||
TruncateAt.END);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends View> T inflateStub(@NonNull View parent, @IdRes int stubId) {
|
||||
return (T)((ViewStub)parent.findViewById(stubId)).inflate();
|
||||
|
||||
Reference in New Issue
Block a user