Custom Span on MultiAutoCompleteTextView with some regex

167 views Asked by At

I want to do @ mentions in my app. When I start typing and notice '@' I show the suggestions from the multiview, I pick the one that I want and at the end I get this string as a result.

Hi @[John Snow](john-snow-id), I'm mention you in this edittext and then ill post you to the server.

Now, what I want to show in the multiview is.

Hi @John Snow I'm mention you in this edittext and then ill post you to the se

and what I want to send to the server is

Hi @[John Snow](john-snow-id), I'm mention you in this edittext and then ill post you to the server.

There can be multiple mentions. Any suggestions?

0

There are 0 answers