Xamarin.forms: Listview.ItemTapped doesnt fire when viewcell has ContxctAction and GestureRecognizer

Created on 6 Mar 2018  路  9Comments  路  Source: xamarin/Xamarin.Forms

Description

ItemTapped event is not fired when a viewcell has contextaction + an element that has a gestrurerecognizer.

On earlier versions of 2.5.0 the issue with this combo was that the contextAction fired just by scrolling the screen (should only fire when longtap), the fix for this issue is here https://github.com/xamarin/Xamarin.Forms/pull/1441.

Now that the fix mentioned is included, Taps doesnt work (with the same combo of viewcell)

Steps to Reproduce

  1. Run Repro (has instructions and is extremely basic)

Expected Behavior

Tapevent should fire

Actual Behavior

Tapevent doesnt fire

Basic Information

  • Version with issue: 2.5.1-pre1
  • Last known good version: 2.4.X
  • IDE: Visual Studio 2017
  • Affected Devices: Android (only tested on android)

Reproduction Link

listtap.zip

gestures 馃枛 listview 8 help wanted Android bug up-for-grabs

Most helpful comment

can we please have some attention on this? would very much like to leave 2.4.X

All 9 comments

can we please have some attention on this? would very much like to leave 2.4.X

bentmar if you want to move to 2.5, XF 2.5.0.122203 is the latest build that doesn't prevent this issue (at least for us)

XF 2.5 has another issue (see #1331). Only XF 2.4 worked for me. I hope Xamarin doesn't need one year to fix the issue ...

The problem seems to be just with the context actions. If I remove them the ItemTapped/ItemSelected events start firing again. Putting a TapGestureRecognizer around the entire cell is almost a workaround, except that when you long press to get the context actions the TapGestureRecognizer fires also. The only workaround I see is putting some sort of icon to tap, like an arrow if your list view item is going to another page.

This bug has surfaced before in the old bugzilla tool. This type of basic ListView functionality is core to many apps, and the fact that it's not somehow tested by the Xamarin team prior to deploying their product is ridiculous. Every Xamarin Forms release since 2.5 has been borderline unusable because of bugs like this and other problems with ListView grouping. I'm probably preaching to the choir, but when Microsoft is involved, this is what you can expect. It's been that way since the 90's. If I had known this acquisition would have happened some day, I would have never started using Xamarin.

Issue is still present in Xamarin.Forms 3.2.0.871581

Shocker

This issue doesn't seem to have had any activity in a long time. We're working on prioritizing issues and resolving them as quickly as we can. To help us get through the list, we would appreciate an update from you to let us know if this is still affecting you on the latest version of Xamarin.Forms, since it's possible that we may have resolved this as part of another related or duplicate issue. If we don't see any new activity on this issue in the next 30 days, we'll evaluate whether this issue should be closed. Thank you!

XF 2.5 has another issue (see #1331). Only XF 2.4 worked for me. I hope Xamarin doesn't need one year to fix the issue ...

Now over two years have passed and finally someone responds! This is only a standardized message, why didn't you test it?

I made a simple project, because I didn't get the project running posted in this thread. Also I'm not able to install XF 2.4 to make a check, because the project structure seems to have changed so much in VS 2019 ...

You can test the following things:

  • ContextAction via long tap
  • GestureRecognizer via tap on a colored box
  • ItemTapped through tapping on a ListView item

On all actions you should be able to get an alert. I tested with the latest XF version 4.6.0.847 and ItemTapped is not called. Either I have an error in my project or the error is still not fixed.

Is there any update or any workaround for this issue?

Was this page helpful?
0 / 5 - 0 ratings