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.

ResetSwipe method doesn't hide SwipeTemplate

Thread ID:

Created:

Updated:

Platform:

Replies:

129974 Apr 12,2017 08:41 PM Aug 13,2017 11:43 PM Xamarin.Forms 8
loading
Tags: SfListView
Jairo Martins Marques
Asked On April 12, 2017 08:41 PM

Hi all,

I tried to use the example in https://help.syncfusion.com/xamarin/sflistview/swiping#swipe-customizations to delete a list item but unfortunately the SwipeTemplate is not hidden after call ResetSwipe() method.

What I'm going wrong?

Regards 

Dinesh Babu Yadav [Syncfusion]
Replied On April 13, 2017 06:44 AM

Hi Jairo, 
 
Thank you for using Syncfusion Products. 
 
We have checked the reported issue “ResetSwipe is not resetting the swiped item” at our end and we suspect that SfListViewRenderer might not be initialized in the application. So, we recommend you to initialize the SfListViewRenderer.Init() in the MainPage constructor before the LoadApplication is called in UWP renderer project and for iOS renderer project, you need to initialize the SfListViewRenderer.Init() in the FinishedLaunching overridde method of the AppDelegate class after the Xamarin.Forms Framework initialization and before the LoadApplication is called.  
 
For more information about initialization of SfListView in each platform, please refer the below UG documentation link.  
 
For your reference, we have prepared a sample which illustrates the customization of SwipeTemplates in SfListView and you can download it from the below link. 
 
In the above sample, we have reset the swipe when the item is deleted after swiping is performed and then tapped on the delete image and we did not face any issue. Could you please check with the above sample?. If the issue still reproduces at your end, please modify the above sample to reproduce the issue and update us with replication procedure or video link and also could you please share the below information? which would help us to analyze the issue better and update you with appropriate solution.  
  
  • Whether the issue replicates only in specific platform like Android or in others such as iOS and UWP platforms too?
  • Can you please share the SfListView version and Xamarin Forms version?. We have tested in Xamarin Forms (v 2.3.3.180) and SfListView (v 15.1.0.41).
 
Regards,  
Dinesh Babu Yadav 
 


Jairo Martins Marques
Replied On April 13, 2017 10:39 AM

Hi Dinesh, thank you for your answer.

Well, I just changed a little bit your code (line 149 of SwippingPage.xaml) and changed the SwipeOffset to "360" and the problem still occur.

Tested in iOS Phone Simulator | iPhone 7 iOS 10.3 and in a Physical device iPhone 7+

Xamarin Studio Version 6.3 (build 863)
Xamarin Forms Version 2.3.4.231
SfListView Version 15.1.0.41

Regards

Dinesh Babu Yadav [Syncfusion]
Replied On April 14, 2017 07:43 AM

Hi Jairo,   
   
Sorry for the inconvenience caused.   
   
We are able to reproduce the reported issue at our end and confirmed that the issue with “ResetSwipe is not after resetting the swiped item” is a defect and logged a defect report for this. The fix for the reported issue will be included in our upcoming 2017 Volume 2 main release which is scheduled to be rolled out by end of this month. We will let you know once the release has been rolled out and we will appreciate your patience until then. 
    
Regards,   
Dinesh Babu Yadav 
 


Dinesh Babu Yadav [Syncfusion]
Replied On June 5, 2017 04:58 AM

Hi Jairo, 
 
Apologies for the delay caused. 
 
We would like to let you know that the reported issue “ResetSwipe is not after resetting the swiped item” can be resolved in sample level by resetting the SwipeOffeset value to “0” from the SwipeEndedEventArgs instead of ResetSwipe method is called as like below code snippet. 
 
Code Example[C#]: 
 
private void ListView_SwipeEnded(object sender, SwipeEndedEventArgs e) 
{ 
  if (e.SwipeOffset >= 360) 
  { 
    if (e.ItemIndex >= 0) 
       viewModel.InboxInfo.RemoveAt(e.ItemIndex); 
    e.SwipeOffset = 0; 
  } 
  itemIndex = e.ItemIndex; 
} 
 
For your reference, we have attached the sample and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 


Malcolm Jack
Replied On June 16, 2017 04:25 AM

Dinesh - it seems this bug still isn't fixed in the latest release?

had to implement your work-around on android for the latest syncfusion controls.

Dinesh Babu Yadav [Syncfusion]
Replied On June 19, 2017 02:02 AM

Hi Malcolm, 
 
We would like to let you know that the reported issue “ResetSwipe is not after resetting the swiped item” is not an issue, it is the actual behavior of SfListView. You can resolve it by sample level as stated in the last update. 
 
Regards, 
Dinesh Babu Yadav 


Brett
Replied On August 11, 2017 03:18 PM

Hi there,

Is there any chance you could fix the help page on the Syncfusion site (https://help.syncfusion.com/xamarin/sflistview/swiping) as I found that page before I found this forum post...

Thanks.

BR



Dinesh Babu Yadav [Syncfusion]
Replied On August 13, 2017 11:43 PM

Hi Brett, 
 
Sorry for the inconvenience. 
 
Okay, we will assure you that the below notes will be included in our UG documentation link and we will update you once it was published. 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 


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.

;