hanggrian / socialview

Android TextView and EditText with hashtag, mention, and hyperlink support
http://hanggrian.com/socialview/
Apache License 2.0
331 stars 81 forks source link

Handle mentions with spaces #25

Closed mohsinnaqvi closed 1 year ago

mohsinnaqvi commented 7 years ago

How do i be able to handle mentions with spaces

Input: @moh Suggestions: "mohsin abbas", "mohsin naqvi", "syed mohsin" after selection it breaks at space.

If I use the displayName and userName prop, Firstly it shows in view which is not cool

All I want is it somehow after selection it shows as one mention including space.

Thanks

rahulvis commented 7 years ago

please help me ..? Firstname Lastname how to give white space as like Suggestions: "mohsin abbas", "mohsin naqvi", "syed mohsin"

hanggrian commented 6 years ago

That is an expected behavior since I thought it is generally accepted that username can't have spaces, is it not?

mohsinnaqvi commented 6 years ago

Its a great piece of code you have written, very help. thanks. but there are few platform which allow usernames with spaces while tagging like facebook.

On 12/07/2017 04:52 PM, Hendra Anggrian wrote:

That is an expected behavior since I thought it is generally accepted that username can't have spaces, is it not?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hendraanggrian/socialview/issues/25#issuecomment-349945745, or mute the thread https://github.com/notifications/unsubscribe-auth/AYuHUxvg3aVVDp7fzcNry73L_B-WR9nXks5s99GXgaJpZM4PzbeR.

arjaywalter commented 6 years ago

Hi @hendraanggrian I think what @mohsinnaqvi is trying to say is like the mention from facebook where in it displays the full name of the user. Would that be possible? Thanks in advance.

AhmadIzaz commented 4 years ago

@hendraanggrian Can you please let me know this library handling mentions with spaces or not still ? Thanks

doanngoctu95 commented 3 years ago

@hendraanggrian Can you please let me know this library handling mentions with spaces or not still ? Thanks

hanggrian commented 3 years ago

I still don't completely understand what the goal is here. But I'll make an attempt: when a hashtag symbol is typed and the adapter pops out, you guys want to search by display name instead of username?

I'm sorry in advance because I don't use Facebook nowadays, I have no idea how they work.

doanngoctu95 commented 3 years ago

@hendraanggrian yes, can you support me about this issue or suggest me sth to resolve this?

hanggrian commented 1 year ago

You may create a custom regex to catch mention strings that can have whitespace, and set it using textView.setMentionPattern(String). Unfortunately, I'm not a regex expert and can't help you much.