6
6
import android .graphics .drawable .ColorDrawable ;
7
7
import android .graphics .drawable .Drawable ;
8
8
import android .graphics .drawable .LayerDrawable ;
9
- import android .text .SpannableStringBuilder ;
10
9
import android .util .Log ;
11
10
import android .view .View ;
12
11
import android .widget .TextView ;
@@ -26,8 +25,8 @@ public class GlideImageSpan extends VerticalImageSpan implements Drawable.Callba
26
25
private Drawable mDrawable ;
27
26
private Animatable animatable ;
28
27
29
- public GlideImageSpan (Context context , String url , TextView textView , SpannableStringBuilder builder , int assumedSize , float scale , String backgroundColor ) {
30
- this (context , url , textView , builder , assumedSize , scale );
28
+ public GlideImageSpan (Context context , String url , TextView textView , int assumedSize , float scale , String backgroundColor ) {
29
+ this (context , url , textView , assumedSize , scale );
31
30
32
31
if (backgroundColor == null )
33
32
return ;
@@ -39,7 +38,7 @@ public GlideImageSpan(Context context, String url, TextView textView, SpannableS
39
38
layerDrawable .setId (1 , 1 );
40
39
}
41
40
42
- public GlideImageSpan (Context context , String url , TextView textView , SpannableStringBuilder builder , int assumedSize , float scale ) {
41
+ public GlideImageSpan (Context context , String url , TextView textView , int assumedSize , float scale ) {
43
42
super (new BlankDrawable ());
44
43
45
44
this .textView = textView ;
@@ -80,7 +79,7 @@ public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? s
80
79
mDrawable = resource ;
81
80
82
81
if (resource .getIntrinsicWidth () != assumedSize ) {
83
- textView .setText (builder );
82
+ textView .setText (textView . getText () );
84
83
Log .d ("EmoteShift" , "Got " + resource .getIntrinsicWidth () + " but assumed " + assumedSize + " (" + url + ")" );
85
84
} else {
86
85
textView .invalidate ();
0 commit comments