-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
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
RecyclerView click event getting blocked #233
Comments
Hello @gbhaumikkumar14 ! Markwon is not applying any touch/click listeners. How do you initialize click listener for the |
I have updated the comment you can check on any parent view if you set click listener and touch textview it's not working. |
I have done like this.
|
Can you confirm that it is |
Yes i confirmed, after applying markdown only that is happening. If i remove |
Can you try calling: textView.setMovementMethod(LinkMovementMethod.getInstance()); before applying markdown? |
No Change in behavior. Still blocking click event. |
There is some weirdness around it. There are similar reports (this for example). And for me it doesn't work even if raw text is set (not markdown). I suggest you set your click listener on the |
Can you try without recyclerview ? |
I'm really on a tight schedule right now 😅 . But if you wish to have click listener for both parent (it has some other views) and TextView - you can apply the same listener for both of them |
Yeah that's last option. I have put some workaround it. |
I'm experiencing the same issue. |
Unfortunately I do not know what can be done on our side, it seems to be a RecyclerView issue |
No, i have checked it's not |
I guess you would be surprised to know that internally |
Same issue here also, without |
I face the same issue |
I have same issue. See the following code. ` inner class ViewHolder(private val binding: ItemFastingBinding) :
When I touch "titleFasting" view click method not trigger. But, I touch "descFasting" view click method is trigger normally. And also, why this issue closed? |
Maybe Markwon creates a clickable span or link span that consumes the click on the textview? |
In my case, click event does work but the ripple animations etc, don't. |
@berendn, markwon.setMarkdown(titleFasting, item.explanation?.en?.title?.breakLine().orEmpty())
titleFasting.movementMethod = null This might be not optimal solution as modifying movement method rebuilds TextView display cache. I find it an oversight from
This is all if your markdown doesn't have links. If you have - it seems that you will need to additionally apply click listener on the Using this approach would allow both widgets to be clickable (TextView can also have links) and visual feedback will still be present and consistent. It can be used like this: final View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View v) {
// clicked!
}
};
holder.itemView.setOnClickListener(listener);
holder.textView.setOnClickListener(listener);
// this would require for parent to have background
TriggerParentHotspot.init(holder.itemView, holder.textView); |
I was also facing the same issue, but I wasn't using any clickables in the text, just other forms of formatting, so I just passed the touch events from the textView to the parent like this:
This way it is also giving the ripple effect from the parent click |
@noties I can't find TriggerParentHotspot anymore, the url is not available now |
Hello @Shunaylov , it was lost during sample migration, but you still can find it in history |
When i set any text using below code, parent recyclerview item view click is not working.
Toast is not coming.
But when i set individual click listener on textview than it's working normal.
The text was updated successfully, but these errors were encountered: