PagingLibrary-Sample icon indicating copy to clipboard operation
PagingLibrary-Sample copied to clipboard

IndexOutOfBoundsException

Open VictoriousAttitude opened this issue 4 years ago • 0 comments

Tried to test your code and here's the stack trace:

"java.lang.IndexOutOfBoundsException: setSpan (73 ... 14) has end before start"

this line of code:

spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(context.getApplicationContext(), R.color.secondary_text)), titleString.lastIndexOf(author) + author.length() + 1, titleString.lastIndexOf(article.getTitle()) - 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

VictoriousAttitude avatar Aug 29 '20 08:08 VictoriousAttitude