Should fix issue 1263

This commit is contained in:
Sylvain Berfini 2014-05-28 10:07:59 +02:00
parent 6e64ccdcbf
commit a1339deb61

View file

@ -265,7 +265,9 @@ public class BubbleChat {
int indexOf = text.indexOf(key);
while (indexOf >= 0) {
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);
}
}