Should fix issue 1263
This commit is contained in:
parent
6e64ccdcbf
commit
a1339deb61
1 changed files with 3 additions and 1 deletions
|
@ -265,7 +265,9 @@ public class BubbleChat {
|
||||||
int indexOf = text.indexOf(key);
|
int indexOf = text.indexOf(key);
|
||||||
while (indexOf >= 0) {
|
while (indexOf >= 0) {
|
||||||
int end = indexOf + key.length();
|
int end = indexOf + key.length();
|
||||||
builder.setSpan(new ImageSpan(context, entry.getValue()), indexOf, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
if (end <= spanned.length()) {
|
||||||
|
builder.setSpan(new ImageSpan(context, entry.getValue()), indexOf, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
}
|
||||||
indexOf = text.indexOf(key, end);
|
indexOf = text.indexOf(key, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue