ItemDoubleTapped Event does not seem to fire

Hi,
Using SFListView, compiling to iOS, my ItemTapped event is firing, but not ItemDoubleTapped. SelectionMode set to Single, TapGesture was originally set to Tap, but have tried removing that setting.
Nothing seems to get the ItemDoubleTapped event firing. What does happen is the ItemTapped event getting fired twice.
Please advise.
Regards,
Phil

8 Replies

MK Muthu Kumaran Gnanavinayagam Syncfusion Team April 25, 2018 05:06 PM UTC

Hi Phil, 
 
We would like to let you that whenever a list item gets tapped, the ItemTapped event will be fired. Also the ItemDoubleTapped event will be fired only when you have tapped immediately after the first tap. This is the default frame work behavior. We have checked the same from our side. Setting TapGesture for the SfListView doesn’t affect this behavior. 
 
Please let us know if you require further assistance. 
 
Regards, 
G.Muthu kumaran. 



PH Phil Holmes April 26, 2018 12:42 AM UTC

Thanks for the reply,

Yes, that would be fine, and understandable if that were what was actually happening, but its not, in my case. Can I ask if you have actually tested this? In my case, the ItemTapped event is firing twice, and the ItemDoubleTapped is never firing, no matter how quickly I double-tap.

I could handle functionality OK if it did work the way you say it should. i.e. ItemTapped fires, then ItemDoubleTapped fires.

Please advise.

Regards,
Phil


MK Muthu Kumaran Gnanavinayagam Syncfusion Team April 26, 2018 06:42 PM UTC

Hi Phil, 
 
We have checked the reported query from our side in a simple sample and found that the SfListView ItemDoubleTapped event is fired as expected. For your reference we have attached the tested sample and the Video cast to showcase the working of SfListView. You can download it from the below location. 
 
 
We have tested in live devices such as iPod and iPad, also in iOS simulators such as iPhone X and iPad pro. 
 
If the provided sample does not meet your requirements, please share more details regarding the usage of ItemDoubleTapped event in your application. 
If possible, please share the template which you have used in your application or please replicate the reported issue in our sample which would be highly helpful for us analyze the reported query better at our end. 
 
Regards, 
G.Muthu kumaran. 



PH Phil Holmes May 1, 2018 02:09 AM UTC

OK, thanks for following up. You are correct.

I found that if the ItemTapped event is doing too much work, then the ItemDoubleTapped event will not fire, but if the ItemTapped event is simple, then does OK. Solution was to put some interlock code in between the two events so first awaits Task.Delay(200). then checks for a flag that the ItemDoubleTapped will set, so if are in a double-tap event, can cause the ItemTapped to bypass & handover to ItemDoubleTapped.

Thanks. 


DB Dinesh Babu Yadav Syncfusion Team May 1, 2018 05:13 AM UTC

Hi Phil, 
 
Thanks for the update. Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 



RI Ricardo replied to Phil Holmes November 15, 2019 07:55 PM UTC

OK, thanks for following up. You are correct.

I found that if the ItemTapped event is doing too much work, then the ItemDoubleTapped event will not fire, but if the ItemTapped event is simple, then does OK. Solution was to put some interlock code in between the two events so first awaits Task.Delay(200). then checks for a flag that the ItemDoubleTapped will set, so if are in a double-tap event, can cause the ItemTapped to bypass & handover to ItemDoubleTapped.

Thanks. 

Can you post a sample of the code?


PH Phil Holmes November 18, 2019 12:56 AM UTC

Hi Ricardo,

In the DoubleTapped event I set a variable for detection & exit from Tapped Event:
private async void ListView_ItemDoubleTapped(object sender, ItemDoubleTappedEventArgs e) {
IsDoubleTapping = true;

                        // DoubleTapping event code

IsDoubleTapping = false;
}

Then in the Tapped Event, I start:
async void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e) {
if (IsDoubleTapping) { return; }

                         // Tapping event code
               }


GP Gnana Priya Namasivayam Syncfusion Team November 18, 2019 06:29 AM UTC

Hi Ricardo,

Please let us know if you would require any assistance. We will happy to assist you.

Regards,
Gnana Priya N


Loader.
Up arrow icon