Closed brunoescalona closed 8 months ago
Hello @brunoescalona ,
Big thanks for letting us know about this issue! Your attention to detail in explaining how to reproduce it is super helpful.
I've taken a look at the issue, and I'm pleased to let you know that I've implemented a solution. The getLineForOffsetInBounds
function has been added to handle scenarios where maxLines
is set, preventing the IndexOutOfBoundsException
.
https://github.com/Aghajari/AnnotatedText/commit/edb879c6303ffbc34a696c3a74788732218d73b3
@Aghajari thanks to you for the effort!
Yesterday I was reviewing the code to try to understand how everything was working and prepare a PR for the fix, but I didn't have time. I didn't expect a so quick fix! 😃
Are you planning to deploy a new version with the changes soon?
@brunoescalona hello again, I just published v1.0.3
Adding
maxLines
to theAnnotatedText
it is causing nIndexOutOfBoundsException
It can be reproduced setting the
maxLines
and also theisParagraphContentsEnabled = true
in theasAnnotatedString
function: