Closed kartikterralogic closed 6 months ago
You can just invoke the getSpans(..) function. It would look something like:
// This will return two spans, one for sheeja, another for akshay
val spans: Array<MentionSpan> = text.getSpans(0, text.length)
Please note that this library only supports using Android views and is not intended/designed to work with Compose (primarily since this library was mostly written ~9 years ago).
Closing this issue since it's just a general Android coding question, not really an issue related to the library. Hopefully the above help!
This is I know: does the specified span return the values for the start and end index? By programming we can able to get the index values, Do we have specified within library itself ?
There are methods to get the start and end of a span, see the methods in this interface.
For example.
Hello world @sheeja , hello @akshay.
Now how can i get start index value and end index value of sheeja and akshay ?
sheeja --> start index is : 14 end index is : 20
akshay --> start index : 30 end index : 35.