Closed CripyIce closed 7 years ago
Another thing i just noticed, it also happens when pressing a Mention in SocialTextView i get an exception that there a no HashTags..
Hi @CripyIce, your adapter and ViewHolder looks okay, so it looks like a legit bug. Do you mind sharing text content of your SocialAutoCompleteTextView
when the error occurs so I can recreate them?
Anyway, completely unrelated, socialview-commons
imports another library I wrote for extending Picasso usage. I see that you are using Glide in your custom adapter, so you really don't need that other library, you can exclude it with:
compile("com.hendraanggrian:socialview-commons:$version") {
exclude group: 'com.hendraanggrian', module: 'picasso-utils'
}
Hi @HendraAnggrian ,
Thanks for the tip ;)
This is the text i am writing down: Hi there @eitantest
.
@CripyIce I have identified the first issue, thank you for the input. Can you elaborate the second issue about mention click listener so I can fix it too in the next release?
@HendraAnggrian This is the code i'm using for the onclick listener:
textView.setOnMentionClickListener(new Function2<SocialView, CharSequence, Unit>() {
@Override
public Unit invoke(SocialView socialView, CharSequence charSequence) {
for (PostMentionModel s : model) {
if (s.getNickname().equals(charSequence.toString())) {
Intent intent = new Intent(context, ProfileActivity.class);
intent.putExtra("userId", s.getUserId());
context.startActivity(intent);
}
}
return null;
}
});
textView.setOnHashtagClickListener(new Function2<SocialView, CharSequence, Unit>() {
@Override
public Unit invoke(SocialView socialView, CharSequence charSequence) {
for (PostTagsModel s : model2) {
if (s.getTagName().equals(charSequence.toString())) {
Intent intent = new Intent(context, TagResultsActivity.class);
intent.putExtra("tagId", s.getTagId());
intent.putExtra("tagName", s.getTagName());
context.startActivity(intent);
}
}
return null;
}
});
it crashes on this line of code: for (PostTagsModel s : model2) {
notice that now i'm using version 0.15.0 with the same code (except that i have to use "SociableView") and it's working great.
Okay I've uploaded version 0.16.0 that addresses these 2 separate issues. Would you kindly try test it again?
Hi @HendraAnggrian, works like a charm! But i detected another bug, should i write it here or open a new issue?
@CripyIce Whichever you are comfortable with :) I'm listening either way
@HendraAnggrian so i'll write it down here :) If i write down a mention and click the user name i get something like that (the mention i wanted and a space to start a new word): After the space i got, i want to continue writing of course, so i begin to write down a letter and get something like that: So far so good. Now if i'll erase that word it will delete the mention and i will get something like that: A bit hard to explain, but i hope you understood :)
So far so good. Now if i'll erase that word it will delete the mention and i will get something like that:
@CripyIce Specifically, which character of @5HTP h
did you backspace into @5hh
?
In my test case, you have to backspace two characters (last space and h
) to achieve it.
If it is true that you backspaced only once, it is most likely a bug I have to discover more.
If instead you backspaced twice like I did, I think it is the default behavior of AppCompatMultiAutoCompleteTextView.Tokenizer
.
@HendraAnggrian it happens to me with every word i type after a mention and even with different mention name.
@CripyIce I'm sorry now I don't much understand what you mean. I would need a detailed list of steps you have taken, along with expected and actual result of each step. Or quite simply a short video of it.
@HendraAnggrian sorry for the delay, but it seems it only happens on the Emulator.. strange. You can close this issue :)
@CripyIce strange indeed, but thank you for confirming!
Hi there friend, Been using a lot your awesome library, but i came across an issue that never occurred to me before. I made an custom adapter for the mentions and assigned it to the SocialAutoCompleteTextView. When i enter a mention or even a hashtag and check if there are mentions or hashtags i get a crash (after pressing a 'post' button that checks if there are mentions/hashtags).
My custom adapter:
Adapter assignment:
My checks:
This is the line where it crashes:
if (postContent.getHashtags().size() > 0) {
With the following error:BTW, i'm using the latest library version 0.15.2 Thanks!