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. Image for the cookie policy date

ResetSwipe method doesn't hide SwipeTemplate

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 

8 Replies

DB Dinesh Babu Yadav Syncfusion Team April 13, 2017 10:44 AM UTC

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 
 



JM Jairo Martins Marques April 13, 2017 02:39 PM UTC

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


DB Dinesh Babu Yadav Syncfusion Team April 14, 2017 11:43 AM UTC

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 
 



DB Dinesh Babu Yadav Syncfusion Team June 5, 2017 08:58 AM UTC

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 
 



MJ Malcolm Jack June 16, 2017 08:25 AM UTC

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.


DB Dinesh Babu Yadav Syncfusion Team June 19, 2017 06:02 AM UTC

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 



BR Brett August 11, 2017 07:18 PM UTC

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




DB Dinesh Babu Yadav Syncfusion Team August 14, 2017 03:43 AM UTC

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 
 


Loader.
Live Chat Icon For mobile
Up arrow icon