-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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] Fixed CollectionView reordering last item #17825
base: main
Are you sure you want to change the base?
Conversation
Hey there @vitalii-vov! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs
Show resolved
Hide resolved
@vitalii-vov Can you add a unit test for this? |
@rmarinho |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you share a sample where could reproduce the issue before the changes?. I would use it to validate in addition to update the PR adding an UI Test.
Hello, Another example is just add <CollectionView.Header>
<Label Text="Hello"/>
</CollectionView.Header> to your CollectionView |
Hello, The base of this fix is already visible on lines 36 and 41. maui/src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs Line 36 in cc549b7
maui/src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs Line 41 in cc549b7
Author just recreated fix used in the situation where "IsGrouped == true && Header != null" the same way for case where "IsGrouped = false && Header != null". I've already tested this and I am currently using it in project the hard way (recreating classes and overriding methods). This can solve application crashing for ppl using Header or HeaderTemplate and not using IsGrouped at the same time so from the base of logic this should be free fix even for testing. Video - TestingPR17825-2.webmStarts with No Fix Fixed Thanks, |
/rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to rebase, but also add a test for this issue.
@jfversluis do you know if we have any reorder test ?
/rebase |
Needs rebase and add a test |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use HasHeader
The adapter seems to have a one
ItemsViewAdapter.ItemsSource.HasHeader;
Description of Change
Fixed application crash when dragging an element to the end of a collection on Android.
Issues Fixed
Fixes #17823