We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In class SocialAutoCompleteTextView in line 42, event onTextChanged it have error, you should use my code, my code is working well.
if (!TextUtils.isEmpty(s) && start < s.length()) { switch (s.charAt(start)) { case '#': if (getAdapter() != hashtagAdapter) { setAdapter(hashtagAdapter); } break; case '@': if (getAdapter() != mentionAdapter) { setAdapter(mentionAdapter); } break; } }
==> My solution:
if (!TextUtils.isEmpty(s) && s.length()>=2) { String string = s.toString(); String[] words = string.split(" "); if (words.length > 0) { String lastWord = words[words.length - 1]; //#h, @t if(lastWord.length()>=2){ if (lastWord.charAt(0) == '#') { String keyword = lastWord.substring(1); if (getAdapter() != hashtagAdapter) { setAdapter(hashtagAdapter); } } else if (lastWord.charAt(0) == '@') { String keyword = lastWord.substring(1); if (getAdapter() != mentionAdapter) { setAdapter(mentionAdapter); } } } } }
Hope to help improve your code! Thanks your project, it is very good!
The text was updated successfully, but these errors were encountered:
I get a lot of issue reports for this library, but unfortunately not much for code suggestion. So thanks for your help.
I admit that the text watcher logic could be better, it's even reported in #7.
What would be great is that you could create a pull request submitting your code, also run all tests before submission.
Otherwise it might take me a while to apply your fixes, in the meantime I'm keeping this open.
Sorry, something went wrong.
Closed for inactivity.
No branches or pull requests
In class SocialAutoCompleteTextView in line 42, event onTextChanged it have error, you should use my code, my code is working well.
if (!TextUtils.isEmpty(s) && start < s.length()) { switch (s.charAt(start)) { case '#': if (getAdapter() != hashtagAdapter) { setAdapter(hashtagAdapter); } break; case '@': if (getAdapter() != mentionAdapter) { setAdapter(mentionAdapter); } break; } }
==> My solution:
if (!TextUtils.isEmpty(s) && s.length()>=2) { String string = s.toString(); String[] words = string.split(" "); if (words.length > 0) { String lastWord = words[words.length - 1]; //#h, @t if(lastWord.length()>=2){ if (lastWord.charAt(0) == '#') { String keyword = lastWord.substring(1); if (getAdapter() != hashtagAdapter) { setAdapter(hashtagAdapter); } } else if (lastWord.charAt(0) == '@') { String keyword = lastWord.substring(1); if (getAdapter() != mentionAdapter) { setAdapter(mentionAdapter); } } } } }
Hope to help improve your code!
Thanks your project, it is very good!
The text was updated successfully, but these errors were encountered: