Search code examples
androidkotlinandroid-layoutandroid-studio-2.2mention

How to add mention adapter on $ character in Android socialview along with @?


We want to enable tagging feature based on $ character and @ character in Android socialview, with 2 different adapter. Any idea how can we achieve this. Please refer to this link for Android Socialview

https://github.com/hendraanggrian/socialview


Solution

  • Take a look at here. Line no. 177 just changing the regex from # to $ should work but there is no direct way of setting it while using their library. You will have to include the source code directly inside your app and make the change.

    Edit:

    As @Darkman suggested change the code at 183 for mentions. @(\\w+) to [@$](\\w+) will do the work.