Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] DragAndDropEndedCommand called before the item is reordered in the collection #71

Closed
InquisitorJax opened this issue Jul 17, 2019 · 1 comment

Comments

@InquisitorJax
Copy link

commented Jul 17, 2019

Platform :

  • OS: Android

Description
In the AndroidHorizontalListViewRenderer, line 120, the command is called before the list is reordered. This means when the handler for the command is executed, the list is still in the order before the drag and drop takes place.

Fix

Move _onDragAndDropdEnded?.Execute(null); line to after the collection is modified.

@InquisitorJax InquisitorJax changed the title DragAndDropEndedCommand called before the item is reordered in the collection [Android] DragAndDropEndedCommand called before the item is reordered in the collection Jul 17, 2019
@NickeManarin

This comment has been minimized.

Copy link

commented Jul 26, 2019

A simple workaround for this issue (if you can't wait for the fix) is to use the ChildrenReordered event from the HorizontalListView.

https://github.com/NickeManarin/Xamarin.Demos2/blob/82254e4adea77ad7ca48cf436961b52dc516f9af/TestApp/View/RegistrationSteps/PhotosView.xaml.cs#L120

In my case, I wanted to know when the list was reordered, in order to adjust the index numbers of each list item.

@roubachof roubachof added this to To do in Kanban board Aug 2, 2019
@roubachof roubachof moved this from To do to In progress in Kanban board Aug 27, 2019
@roubachof roubachof moved this from In progress to Done in Kanban board Aug 27, 2019
@roubachof roubachof closed this in e2565ff Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.