We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ItemHolding is called twice

Thread ID:

Created:

Updated:

Platform:

Replies:

130841 Jun 6,2017 08:54 PM Jun 8,2017 06:23 AM Xamarin.Forms 3
loading
Tags: SfListView
Emil
Asked On June 6, 2017 08:54 PM

SfListview is always called twice when navigating away from the page where sflistview is and coming back to this page.
First time when i come page where sflistview, ItemHolding is called only 1 time but if I navigate to a page from this page and then come back to sfListView page, do ItemHolding, it is called twice.

Dinesh Babu Yadav [Syncfusion]
Replied On June 7, 2017 03:27 AM

Hi Emil, 
 
Sorry for the inconvenience caused.  
  
We are able to reproduce the reported issue “Item Holding event is triggered twice in Android platform” at our end. In UWP and iOS platform, the event is triggered once as expected. As this is forum, we cannot provide patch so, a support incident has been created under your account for providing custom assemblies which includes the fix for the reported issue. Please log on to our support website to check for further updates.           
     
  
Regards,  
Dinesh Babu Yadav 


Emil
Replied On June 7, 2017 05:51 AM

Thank you. I missed to say that it is Android only but you figure it out already. Anybody needs a temporary solution until fix will be released. I handled as below. But I guess this will work better for async-await cases.

  bool flag = false;
        private async void list_ItemHolding(object sender, Syncfusion.ListView.XForms.ItemHoldingEventArgs e)
        {
            if (flag)
                return;

            flag = true;

              await DoSomething();

            flag = false;
     

        }

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On June 8, 2017 06:23 AM

 
Thanks for the valuable work around. 
 
Regards, 
G.Muthu Kumaran. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;