To give context to my problem, think Twitter: There is a list of tweets. You can click any part of the Tweet to view the Tweet singularly. If an account is tagged in the Tweet with an @ then if you click on the account name, you are directed to the account's profile.
This is almost exactly what I'm trying to do in my app. I have a ListView of custom layouts I'll call wall posts. My wall posts include a TextView, and if a user is tagged in this text view with an @, e.g. @username, then I make @username spannable and set an onClickListener for that text. In my implementation I know that the spannable string was successfully set because the text is correctly underlined and blue by default. The problem is that when I click on the text, my click is treated like I clicked on the wall post, and the user who posted the wall post's account is opened for viewing, not the tagged user.
So in conclusion, with that context given, my question is: how can I make spannable string clicks override the clicks of the ListView items that the spannable strings are contained in? I still need the ListView OnItemClickListener to handle clicks on ListView items when not clicking on the spannable string. Thanks for any help, I really appreciate it!
P.S. I have looked at similar questions such as this one, which has no answer, and this one, whose suggestion to add this line here:
txtViewTwo.setMovementMethod(LinkMovementMethod.getInstance());
makes my spannable string clickable, but nullifies clicks on ListView items.