[Android] CollectionView: Fix drag-and-drop reordering into empty groups#31867
Conversation
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/rebase |
fd537a6 to
b245a0e
Compare
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Update Issue12008.cs ·
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31867 | Check source ItemViewType instead of comparing source==target; add bounds validation | ⏳ PENDING (Gate) | 6 impl + 2 test | Original PR |
🚦 Gate — Test Verification
📝 Review Session — Update Issue12008.cs · b245a0e
Result: ✅ PASSED
Platform: android
Mode: Full Verification
TestFilter: Issue12008
- Tests FAIL without fix ✅
- Tests PASS with fix ✅
| Check | Expected | Actual | Result |
|---|---|---|---|
| Tests WITHOUT fix | FAIL | FAIL | ✅ |
| Tests WITH fix | PASS | PASS | ✅ |
🔧 Fix — Analysis & Comparison
📝 Review Session — Update Issue12008.cs · b245a0e
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix | GroupHeader early-exit in OnMove + clamp toItemIndex to 0 in adapter | ✅ PASS | 2 files | Android-only; target-focused check |
| 2 | try-fix | Delegate all type validation to adapter via new CanItemMove() interface | ✅ PASS | 4 files | Android-only; adds public API change to IItemTouchHelperAdapter |
| 3 | try-fix | viewHolder.ItemViewType != target.ItemViewType && target.ItemViewType != ItemViewType.GroupHeader + clamp |
✅ PASS | 2 files | Smallest change; Android-only |
| 4 | try-fix | Offset target position by +1 for GroupHeader targets in OnMove | ❌ FAIL | 2 files | Position arithmetic incorrect; item not inserted |
| 5 | try-fix | Check source IS TextItem/TemplatedItem (inverse allowlist) + clamp | ✅ PASS | 2 files | Inverse of PR; equivalent but Android-only |
| PR | PR #31867 | Check source IS Header/Footer/GroupHeader/GroupFooter in OnMove; bounds validation in adapter; iOS fix in Items/ and Items2/ | ✅ PASS (Gate) | 6 impl + 2 test | Fixes Android + iOS |
Cross-Pollination Round 2
| Model | Response |
|---|---|
| claude-sonnet-4.5 | Suggested OnSelectedChanged override, sentinel detection, ChooseDropTarget — but concluded "over-engineering, recommend PR's fix" |
| claude-opus-4.6 | NO NEW IDEAS — design space saturated |
| gpt-5.2 | Suggested CanDropOver/ChooseDropTarget (complex, over-engineering) |
| gpt-5.2-codex | Suggested temporary placeholder item in empty groups (complex, invasive) |
| gemini-3-pro-preview | NO NEW IDEAS |
Exhausted: Yes — all 5 models confirmed no viable new ideas beyond over-engineering
Selected Fix: PR's fix — Reason: The PR is the only fix that addresses ALL affected platforms (Android + iOS both Items/ and Items2/). The alternative try-fix attempts only fixed Android and missed the significant iOS improvements (MoveItem index validation and GetTargetIndexPathForMove empty group routing). The PR's approach is also the most complete with bounds validation in the adapter, making it more defensive against edge cases.
📋 Report — Final Recommendation
📝 Review Session — Update Issue12008.cs · b245a0e
✅ Final Recommendation: APPROVE
Summary
PR #31867 fixes CollectionView drag-and-drop reordering into empty groups, which was broken because the OnMove guard in SimpleItemTouchHelperCallback compared source and target ItemViewType, rejecting drops onto GroupHeader views (the only visible element in an empty group). The PR correctly identifies the root cause, fixes it across Android and iOS (both handler versions), and includes UI tests that verify the fix.
Gate passed: tests FAIL without the fix, PASS with it.
Five independent try-fix alternatives were explored (4 passed, 1 failed). All passing alternatives are narrower in scope (Android-only) — the PR's fix is the most complete because it also fixes iOS (both Items/ and Items2/).
Root Cause
In SimpleItemTouchHelperCallback.OnMove (Android), the original condition was:
if (viewHolder.ItemViewType != target.ItemViewType) return false;An empty group has no items — only a group header. When dragging an item over an empty group, the target ViewHolder is a GroupHeader with a different ItemViewType than the dragged item, causing the drop to be silently rejected.
On iOS, similar issues existed in MoveItem (no validation for empty destination lists) and GetTargetIndexPathForMove (no routing to empty groups).
Fix Quality
Android fix is correct and minimal:
SimpleItemTouchHelperCallback.OnMove: Checks if source is a structural element (Header/Footer/GroupHeader/GroupFooter); allows items to be dropped onto GroupHeadersReorderableItemsViewAdapter.OnItemMove: Adds bounds validation before list access
iOS fix is correct and comprehensive:
MoveItem: Added section bounds check, fromList/fromItemIndex validation, and empty group toItemIndex clampingGetTargetIndexPathForMove: Refactored to properly route drops to empty groups, withFindFirstEmptyGrouphelper
Code Review Findings
🟡 Minor Issue: Off-by-One in Bounds Check
File: src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs
if (fromItemIndex < 0 || fromItemIndex > fromList.Count) // should be >= fromList.CountfromList[fromItemIndex] would throw ArgumentOutOfRangeException if fromItemIndex == fromList.Count. The check should be >=. In practice this edge case is unlikely (the index calculation won't produce == Count for valid drags), but it's worth noting for correctness.
The toItemIndex > toList.Count check is correct because IList.Insert allows index == Count (append).
🟡 Style: Double Blank Line
File: src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewDelegator.cs (and Delegator2.cs)
There's an extra blank line before the if (proposedIndexPath.Section >= totalSections) check. Minor style issue only.
✅ Positives
- The core Android fix is surgical and correct — only the source type check changes, and it uses existing
ItemViewTypeconstants consistently withGetMovementFlags - iOS empty-group routing via
FindFirstEmptyGroupis a clean helper that avoids duplicate logic betweenItems/andItems2/ - Tests include both happy path (empty group creation) and behavior (drag into empty group) verification
#if TEST_FAILS_ON_WINDOWSguard is correct since Windows CollectionView drag-and-drop with groups is unsupported
Title / Description Assessment
Title: "Fix for CollectionView Drag and Drop Reordering Can't Drop in Empty Group "
- Trailing space should be trimmed
- Could follow platform-component convention:
[Android/iOS] CollectionView: Fix drag-and-drop into empty groups - Current title is functional but verbose
Description: Good quality — contains root cause, description of change, issues fixed, tested platforms, and screenshots. NOTE block is present. No rewrite needed.
📋 Expand PR Finalization Review
Title: ⚠️ Needs Update
Current: Fix for CollectionView Drag and Drop Reordering Can't Drop in Empty Group
Issues:
- Trailing space at the end
- "Fix for" prefix is title should describe behavior changed, not say "Fix for"noise
- No platform the fix covers Android AND iOS/MacCatalyst (both Items/ and Items2/ handlers)prefix
- Doesn't follow recommended formula:
[Platform] Component: What changed
Recommended: [Android][iOS] CollectionView: Fix drag-and-drop reordering into empty groups
Description: ⚠️ Needs Update
- Trailing space at the end
- "Fix for" prefix is title should describe behavior changed, not say "Fix for"noise
- No platform the fix covers Android AND iOS/MacCatalyst (both Items/ and Items2/ handlers)prefix
- Doesn't follow recommended formula:
[Platform] Component: What changed
✨ Suggested PR Description
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause
When performing drag-and-drop reordering in a grouped CollectionView with CanReorderItems=true and CanMixGroups=true, dropping an item into an empty group fails.
Android: SimpleItemTouchHelperCallback.OnMove compared viewHolder.ItemViewType of the dragged item against the target's ItemViewType. In an empty group, the only visible element is the group header, which has a different ItemViewType (Header/GroupHeader) than regular items. This mismatch caused OnMove to return false, blocking the drop.
iOS/MacCatalyst: GetTargetIndexPathForMove in the delegators didn't handle empty groups — it had no awareness of group item counts and didn't clamp index paths into valid positions within empty groups. MoveItem in the view controllers assumed fromList and toList were both non-null and didn't guard against out-of-range indices.
Description of Change
Android (SimpleItemTouchHelperCallback.cs)
Changed the OnMove guard from comparing item view types between source and target to instead checking whether the source item is a non-draggable type (Header, Footer, GroupHeader, GroupFooter). This allows drops onto group headers (which represent empty groups) while still preventing dragging headers and footers themselves.
Android (ReorderableItemsViewAdapter.cs)
Added bounds checks for fromItemIndex and toItemIndex before accessing/inserting into the underlying lists, preventing potential IndexOutOfRangeException edge cases.
iOS/MacCatalyst — Delegators (ReorderableItemsViewDelegator.cs, ReorderableItemsViewDelegator2.cs)
Significantly reworked GetTargetIndexPathForMove to properly resolve drop targets for empty groups:
- Checks
CanMixGroupsbefore allowing cross-group drops - Retrieves
ItemCountInGroupfor the proposed target section - For empty target groups (
targetGroupItemCount == 0), returnsNSIndexPath(row: 0, section: proposedSection) - Clamps proposed rows exceeding the group count to the last valid position
- Added
FindFirstEmptyGrouphelper for the edge case of hovering back over the original index while in mix-groups mode
iOS/MacCatalyst — View Controllers (ReorderableItemsViewController.cs, ReorderableItemsViewController2.cs)
Improved MoveItem for grouped reordering:
- Added section bounds guard (early return if
destinationIndexPath.Section >= itemsSource.GroupCount) - Restructured null checks for
fromList/toListto use early returns for clarity - Clamps
toItemIndexto[0, toList.Count]to handle drops into empty or boundary positions
Both Items/ (legacy handler) and Items2/ (current handler) iOS/MacCatalyst implementations receive identical fixes.
Issues Fixed
Fixes #12008
Platforms Tested
- Android
- Windows (drag-and-drop with grouped reordering not supported)
- iOS
- Mac
Code Review: ⚠️ Issues Found
Code Review — PR #31867
PR: CollectionView Fix — Drag and Drop Reordering Can't Drop in Empty Group
🔴 Critical Issues
Potential IndexOutOfRangeException in Android Adapter
File: src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs
Problem: The bounds check for fromItemIndex uses > instead of >=:
if (fromItemIndex < 0 || fromItemIndex > fromList.Count)
{
return false;
}When fromItemIndex == fromList.Count, the condition evaluates to false, so execution continues down to:
var fromItem = fromList[fromItemIndex];This accesses the list at index Count, which is one past the end — this will throw ArgumentOutOfRangeException.
Correct fix:
if (fromItemIndex < 0 || fromItemIndex >= fromList.Count)
{
return false;
}Note: The toItemIndex check correctly uses > (since you can Insert at index Count), so only the fromItemIndex guard needs fixing.
🟡 Suggestions
1. Test [Issue] Attribute: Missing iOS and Mac Platforms
File: src/Controls/tests/TestCases.HostApp/Issues/Issue12008.cs
Problem: The [Issue] attribute only marks PlatformAffected.Android:
[Issue(IssueTracker.Github, 12008, "CollectionView Drag and Drop Reordering Can't Drop in Empty Group", PlatformAffected.Android)]But this PR also fixes the same bug for iOS and MacCatalyst (both Items/ and Items2/ handlers). The attribute should reflect all affected platforms.
Recommendation:
[Issue(IssueTracker.Github, 12008, "CollectionView Drag and Drop Reordering Can't Drop in Empty Group", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.macOS)]2. Test Class Wrapped in #if TEST_FAILS_ON_WINDOWS — Should Run on iOS/Android
File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12008.cs
Problem: The entire test class is wrapped in #if TEST_FAILS_ON_WINDOWS:
#if TEST_FAILS_ON_WINDOWS
// ... both tests ...
#endifThis is used to exclude tests that fail on Windows because drag-and-drop with grouping isn't supported there. However, wrapping the whole class means the tests are only compiled and visible on non-Windows platforms. The tests should still run on both Android and iOS (both of which received fixes in this PR). This is the current correct pattern for Windows exclusion, so it is acceptable — but the PR description should note that both Android and iOS are tested.
No code change required — this is flagged only for awareness.
3. Missing Newline at End of File
File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12008.cs
Problem: The diff shows \ No newline at end of file at the bottom of Issue12008.cs in the shared tests project.
Recommendation: Add a newline at the end of the file to follow standard conventions.
4. FindFirstEmptyGroup Logic in Delegators: Unusual Trigger Condition
Files:
src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewDelegator.cssrc/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewDelegator2.cs
Problem: FindFirstEmptyGroup is only invoked when:
if (originalIndexPath.Equals(proposedIndexPath) && itemsView.CanMixGroups)During a drag operation, originalIndexPath typically differs from proposedIndexPath (that's the whole point of the drag), so this condition may rarely or never be true. This means the FindFirstEmptyGroup helper might be dead code in practice or only covers a very narrow edge case (e.g., hovering exactly back over the item's original position while CanMixGroups is true).
Recommendation: Verify whether this condition is actually reachable during normal drag-and-drop. If this is meant to handle hovering over an empty group area that maps back to the original index (because there are no items to target), the logic may need a different trigger condition. If this case is intentionally niche, add a comment explaining when it fires.
✅ What's Done Well
- Android
SimpleItemTouchHelperCallback.cs: The fix to replaceviewHolder.ItemViewType != target.ItemViewTypewith an explicit check for non-draggable types (Header, Footer, GroupHeader, GroupFooter) is semantically correct. Old check prevented dropping on a group header because headers have a differentItemViewType; the new check correctly allows dropping when the dragged item is a regular record. - Both Items/ and Items2/ iOS handlers fixed in sync: The identical fixes applied to
ReorderableItemsViewController.cs/ReorderableItemsViewController2.csand both delegator files ensures consistent behavior across both handler implementations. - iOS index clamping: The logic that clamps
toItemIndexto[0, toList.Count]for empty groups is well-structured and handles the three cases (empty target, overflow, underflow) explicitly. - Section bounds check in iOS controllers: The early-return guard
if (destinationIndexPath.Section >= itemsSource.GroupCount)prevents crashes when dragging past the valid section range. - Null checks restructured in iOS controllers: Splitting the original
if (fromList != null && toList != null)into separate early returns is a good readability improvement. - UI test coverage added: Both
EmptyGroupCreationShouldWorkandDragItemIntoEmptyGroupShouldSucceedtests cover the primary scenarios.
kubaflo
left a comment
There was a problem hiding this comment.
Could you please split these pr for 2 new ones - iOS and Android?
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 31867Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 31867" |
🚦 Gate - Test Before and After Fix📊 Expand Full Gate —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue12008 Issue12008 |
✅ FAIL — 1667s | ✅ PASS — 485s |
🔴 Without fix — 🖥️ Issue12008: FAIL ✅ · 1667s
(truncated to last 15,000 chars)
0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
Build FAILED.
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
0 Warning(s)
1 Error(s)
Time Elapsed 00:16:48.70
* daemon not running; starting now at tcp:5037
* daemon started successfully
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:07:56.07
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 1.25 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.66 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 5 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 457 ms).
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 4 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 1.71 sec).
5 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.10] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.27] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 2 of 2 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/06/2026 22:07:31 FixtureSetup for Issue12008(Android)
>>>>> 04/06/2026 22:07:35 DragItemIntoEmptyGroupShouldSucceed Start
>>>>> 04/06/2026 22:07:44 DragItemIntoEmptyGroupShouldSucceed Stop
>>>>> 04/06/2026 22:07:44 Log types: logcat, bugreport, server
Failed DragItemIntoEmptyGroupShouldSucceed [10 s]
Error Message:
Item was not moved into the empty group
Assert.That(countText, Is.EqualTo("Count: 1"))
String lengths are both 8. Strings differ at index 7.
Expected: "Count: 1"
But was: "Count: 0"
------------------^
Stack Trace:
at Microsoft.Maui.TestCases.Tests.Issues.Issue12008.DragItemIntoEmptyGroupShouldSucceed() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12008.cs:line 41
1) at Microsoft.Maui.TestCases.Tests.Issues.Issue12008.DragItemIntoEmptyGroupShouldSucceed() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12008.cs:line 41
>>>>> 04/06/2026 22:07:45 EmptyGroupCreationShouldWork Start
>>>>> 04/06/2026 22:07:47 EmptyGroupCreationShouldWork Stop
Passed EmptyGroupCreationShouldWork [1 s]
NUnit Adapter 4.5.0.0: Test execution complete
Test Run Failed.
Total tests: 2
Passed: 1
Failed: 1
Total time: 36.0198 Seconds
🟢 With fix — 🖥️ Issue12008: PASS ✅ · 485s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:06:10.08
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13757578
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.16] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.44] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 2 of 2 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/06/2026 22:15:41 FixtureSetup for Issue12008(Android)
>>>>> 04/06/2026 22:15:44 DragItemIntoEmptyGroupShouldSucceed Start
>>>>> 04/06/2026 22:15:53 DragItemIntoEmptyGroupShouldSucceed Stop
Passed DragItemIntoEmptyGroupShouldSucceed [8 s]
>>>>> 04/06/2026 22:15:53 EmptyGroupCreationShouldWork Start
>>>>> 04/06/2026 22:15:55 EmptyGroupCreationShouldWork Stop
Passed EmptyGroupCreationShouldWork [1 s]
NUnit Adapter 4.5.0.0: Test execution complete
Test Run Successful.
Total tests: 2
Passed: 2
Total time: 24.5977 Seconds
📁 Fix files reverted (3 files)
eng/pipelines/ci-copilot.ymlsrc/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cssrc/Controls/src/Core/Handlers/Items/Android/SimpleItemTouchHelperCallback.cs
🤖 AI Summary📊 Expand Full Review —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31867 | Change OnMove to check source view type (not target); add bounds checks in adapter |
✅ PASSED (Gate) | SimpleItemTouchHelperCallback.cs, ReorderableItemsViewAdapter.cs |
Android only |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (opus-4.6) | Narrow target check: only block top-level Header/Footer; allow GroupHeader/GroupFooter as drop targets; bounds clamping in adapter | ✅ PASS | 2 files | Precise — still guards global header/footer |
| 2 | try-fix (sonnet-4.6) | Remove ALL type checks from OnMove; Math.Max/Min clamping in adapter |
✅ PASS | 2 files | Simplest — fewest lines, trusts GetMovementFlags fully |
| 3 | try-fix (gpt-5.3-codex) | Allow only GroupHeader as target (keep Header/Footer/GroupFooter blocked); normalize index -1→0 only for header-drop case in adapter |
✅ PASS | 2 files | Targeted — explicit model for "drop onto header = insert at group start" |
| 4 | try-fix (gpt-5.4) | Split target filtering via private helper; allow GroupHeader through; adapter handles empty-group-specific insertion | ✅ PASS | 2 files | Clear separation of concerns |
| PR | PR #31867 | Check source view type (not target) in OnMove; return false bounds checks in adapter |
✅ PASSED (Gate) | 2 files | Android fix |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | Yes | Override CanDropOver() to block Header/Footer while allowing GroupHeader — semantically correct Android API for drop-target filtering |
| claude-sonnet-4.6 | 2 | Yes | Override chooseDropTarget() for target substitution before OnMove — redirect GroupHeader to real item slot |
| gpt-5.3-codex | 2 | Yes | Add ResolveDropPosition() mapper in adapter to convert structural targets to nearest valid insertion slot |
| gpt-5.4 | 2 | Yes | Introduce temporary virtual "drop slot" row for empty groups during drag — avoids header-specific logic entirely |
All cross-pollination ideas are architecturally more complex (more files/design) than existing passing candidates. No additional test runs needed.
Exhausted: Yes
Selected Fix: PR's fix — correct, minimal, and defensive. Source-type check in OnMove + bounds guards in adapter. Attempt 2 (remove all checks + clamping) is an equally valid, marginally simpler alternative.
📋 Report — Final Recommendation
✅ Final Recommendation: APPROVE
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #12008 — Android grouped CollectionView drag-and-drop into empty groups |
| Gate | ✅ PASSED | Android — tests fail without fix, pass with fix |
| Try-Fix | ✅ COMPLETE | 4 attempts, 4 passing; PR's fix selected |
| Report | ✅ COMPLETE |
Selected Fix: PR — Source-type check in OnMove + bounds guards in adapter
Summary
PR #31867 fixes a longstanding Android bug where items could not be dragged into an empty group in a grouped CollectionView. The root cause was SimpleItemTouchHelperCallback.OnMove blocking all moves onto GroupHeader view types — and since an empty group's only element is its GroupHeader, drops into empty groups were impossible. The fix is correct for the primary scenario, passes the gate, and is safe to merge with a few minor notes for the author.
Root Cause
In SimpleItemTouchHelperCallback.OnMove, the original code checked the target ItemViewType and returned false if the target was any structural element (Header, Footer, GroupHeader, GroupFooter). When dragging into an empty group, the only available drop target is the GroupHeader — so the check always rejected the move. No adapter-side crash protection existed for the resulting out-of-bounds indices.
Fix Quality
What the PR does:
SimpleItemTouchHelperCallback.OnMove— Switches from checking the target view type to checking the source (dragged item's) view type. This unblocks drops ontoGroupHeaderelements.ReorderableItemsViewAdapter.OnItemMove— Addsreturn falsebounds guards forfromItemIndexandtoItemIndex.
Issues to flag to the author:
-
Source type check in
OnMoveis redundant (dead code).GetMovementFlagsalready returnsMakeMovementFlags(0, 0)forHeader/Footer/GroupHeader/GroupFooter, which prevents them from being long-press-dragged at all. ThereforeviewHolder.ItemViewTypeinOnMovecan never be a structural element — the newif (sourceItemViewType == ...)block is unreachable. It's harmless as a defensive check, but the deleted comments explaining the original design were more informative than the replacement. -
Potential incomplete fix for upward drag into empty groups. The adapter calculates
toItemIndex = toIndex - 1(header offset). It then only applies+1whentoGroupIndex > fromGroupIndex(target group is below source). If the empty group is above the source group,toItemIndexremains-1and the newreturn falseguard blocks the drop — same as before the fix. The existing test only covers the case where the empty group is added at the end (always below source). Replacingreturn falsewith clamping (toItemIndex = Math.Max(0, toItemIndex)) would handle both directions correctly. Three of the four try-fix alternatives used clamping and all passed. -
Trailing whitespace. Line 21 of
SimpleItemTouchHelperCallback.cshas a trailing space:{(theGetMovementFlagsopening brace). Minor but should be cleaned up before merge. -
EmptyGroupCreationShouldWorktest doesn't test the bug. It only verifies that tapping a button updates a label — this is unrelated to the drag-and-drop fix. Not blocking, but the test name is misleading.
Strengths:
- Fix is minimal and focused on the right files
- Test
DragItemIntoEmptyGroupShouldSucceedcorrectly validates the core scenario - Tests are properly wrapped in
#if TEST_FAILS_ON_WINDOWS INotifyPropertyChanged,ObservableCollection, andDataTemplateusage in HostApp is idiomatic
Comparison with alternatives:
| Approach | Simplicity | Handles upward drag | Recommended |
|---|---|---|---|
PR fix (source check + return false) |
✅ Simple | ✅ Approvable with note | |
| Attempt 2: Remove all checks + clamping | ✅ Simpler | ✅ Full | Better long-term |
| Attempt 3: Allow only GroupHeader as target + normalize | ✅ Targeted | ✅ Full | Valid alternative |
The PR's fix is approvable. The upward-drag edge case is a secondary concern that can be addressed in a follow-up if a user reports it, or the author can address item 2 now with a one-line clamping change.
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes #12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…otnet#34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes dotnet#12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ dotnet#31867](dotnet#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes #12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…ps test failure regression (#35000) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Description Fixes a regression introduced by PR #31867, where all grouped CollectionView drag-and-drop reorder tests fail on Android — most visibly `VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups`. ### Root cause PR #31867 changed SimpleItemTouchHelperCallback.OnMove from checking the target view type to checking the source view type, so that items can be dropped onto empty group headers. The side effect: OnItemMove can now be called with a non-empty group's GroupHeader as toPosition. When dragging an item forward past the next group's header (e.g., "Banana" toward "Potato"), OnItemMove fires with the GroupHeader as target and prematurely inserts the item mid-gesture, before the drop is intentional. LTR tests pass accidentally — the premature insertion moves the item downward, so the newY > initialY assertion coincidentally passes. RTL test fails — the mid-gesture NotifyItemMoved causes a layout pass that makes ItemTouchHelper's internal gesture offset stale in RTL coordinate space, aborting the drag and leaving newY == initialY. ### Description of Change Added a guard in `ReorderableItemsViewAdapter.OnItemMove:` when the drag targets a non-empty group's header (toIndex == 0, HasHeader == true, Count > 0), return false immediately — no data mutation, drag continues cleanly. Empty group headers are still allowed as drop targets, preserving the original PR #31867 intent. ### Issues Fixed - Regression introduced by PR #31867 - **Resolved test case:** VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/e61cb83d-d631-4a75-9715-85366cad9593"> | <img src="https://github.com/user-attachments/assets/9f10fd8b-f173-426d-ae54-79daa82beb56">|
…otnet#34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes dotnet#12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ dotnet#31867](dotnet#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (dotnet#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes dotnet#12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes #12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…ps test failure regression (#35000) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Description Fixes a regression introduced by PR #31867, where all grouped CollectionView drag-and-drop reorder tests fail on Android — most visibly `VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups`. ### Root cause PR #31867 changed SimpleItemTouchHelperCallback.OnMove from checking the target view type to checking the source view type, so that items can be dropped onto empty group headers. The side effect: OnItemMove can now be called with a non-empty group's GroupHeader as toPosition. When dragging an item forward past the next group's header (e.g., "Banana" toward "Potato"), OnItemMove fires with the GroupHeader as target and prematurely inserts the item mid-gesture, before the drop is intentional. LTR tests pass accidentally — the premature insertion moves the item downward, so the newY > initialY assertion coincidentally passes. RTL test fails — the mid-gesture NotifyItemMoved causes a layout pass that makes ItemTouchHelper's internal gesture offset stale in RTL coordinate space, aborting the drag and leaving newY == initialY. ### Description of Change Added a guard in `ReorderableItemsViewAdapter.OnItemMove:` when the drag targets a non-empty group's header (toIndex == 0, HasHeader == true, Count > 0), return false immediately — no data mutation, drag continues cleanly. Empty group headers are still allowed as drop targets, preserving the original PR #31867 intent. ### Issues Fixed - Regression introduced by PR #31867 - **Resolved test case:** VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/e61cb83d-d631-4a75-9715-85366cad9593"> | <img src="https://github.com/user-attachments/assets/9f10fd8b-f173-426d-ae54-79daa82beb56">|
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes #12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…34151) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When using a grouped CollectionView with CanReorderItems="True" and CanMixGroups="True", users could not drag items into empty groups on iOS/MacCatalyst. The item would snap back to its original position instead of being placed in the target empty group. Additionally, group header count labels did not update after a successful reorder. ### Root Cause Two issues in the iOS UICollectionView interactive movement API: **No drop target for empty groups:** UICollectionView has no cells in empty sections, so it cannot compute a valid proposedIndexPath for the drop. It falls back to returning originalIndexPath (the item's starting position), effectively preventing the move. The delegator's GetTargetIndexPathForMove override was not handling this fallback case. **Stale group headers after reorder:** UICollectionView.EndInteractiveMovement() updates cell positions but does not trigger a refresh of supplementary views (group headers). As a result, header-bound data like item counts remained stale after drag-and-drop. ### Description of Change: **ReorderableItemsViewDelegator / ReorderableItemsViewDelegator2** — GetTargetIndexPathForMove: When UICollectionView can't resolve a drop target in an empty group area, it falls back to proposedIndexPath == originalIndexPath. The fix detects this condition (when CanMixGroups is enabled) and redirects the drop to the nearest empty group using FindNearestEmptyGroup, which searches outward from the current section for the closest match. ReorderableItemsViewController / ReorderableItemsViewController2 — HandleLongPress: After EndInteractiveMovement(), UICollectionView does not refresh supplementary views (group headers). Added a ReloadSections call wrapped in UIView.PerformWithoutAnimation so group header data (e.g. item counts) updates immediately after a reorder completes. ### Issues Fixed Fixes #12008 ### Additional context: The issue was also reproduced on Android and has been addressed separately in a dedicated PR [ #31867](#31867) ### Tested the behaviour in the following platforms - [ ] Android - [ ] Windows - [x] iOS - [x] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/540bd5d4-3457-4b9f-a254-24547ecfacdf">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/4a56a5d2-08a7-4ea2-8ce7-c2f25018623a">|
…ups (#31867) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description: Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly. ### RootCause: The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing. ### Description of Change Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups. ### Issues Fixed Fixes #12008 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Before Issue Fix | After Issue Fix | |----------|----------| |<video width="100" height="100" alt="Before Fix" src="https://github.com/user-attachments/assets/a0e3dfb2-d5df-438a-a253-3816a992f150">|<video width="100" height="100" alt="After Fix" src="https://github.com/user-attachments/assets/43ab9f0b-0090-4916-8a6b-1022a67fb139">| --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
## Blazor - Fix: Filter precompressed RCL assets from MAUI Blazor Hybrid APKs by @mattleibow in #33917 <details> <summary>🔧 Fixes</summary> - [.NET MAUI Blazor Hybrid App should not precompress assets](#33773) </details> - [Windows] Fix for Runtime error when closing external window with WPF Webview Control by @BagavathiPerumal in #34006 <details> <summary>🔧 Fixes</summary> - [Runtime error when closing external window with WPF Webview Control](#32944) </details> ## Button - [Android] ImageButton CornerRadius not being applied - fix by @kubaflo in #30074 <details> <summary>🔧 Fixes</summary> - [ImageButton CornerRadius not being applied on Android](#23854) </details> - Fix Disabled visual state ignored when Button has locally-set BackgroundColor/TextColor by @Dhivya-SF4094 in #34444 <details> <summary>🔧 Fixes</summary> - [[regression/9.0] VisualState "Disabled" is not properly applied for Button with custom appearance](#34363) </details> ## CollectionView - Fix CollectionView grid spacing updates for first row and column by @KarthikRajaKalaimani in #34527 <details> <summary>🔧 Fixes</summary> - [[MAUI] I2_Vertical grid for horizontal Item Spacing and Vertical Item Spacing - horizontally updating the spacing only applies to the second column](#34257) </details> - Fix CollectionView record struct selection on Windows by @jeremy-visionaid in #33488 - [Android] Ensure disconnected ItemsViewHandler doesn't hold onto the items source by @filipnavara in #24610 <details> <summary>🔧 Fixes</summary> - [Crash on NullReferenceException with measurement cells in CollectionView](#24304) </details> - [Windows] Fixed VisualState Setters not working properly for CollectionView by @Dhivya-SF4094 in #27230 <details> <summary>🔧 Fixes</summary> - [VisualState Setters not working properly on Windows for a CollectionView](#27086) - [[regression/8.0.3] [Windows][CollectionView]Label Disappear when set Style in ContentPage.Resources](#19209) - [[Windows] Label style defined as ContentPage Resource doesn't propagate to CollectionView](#18701) </details> - [Windows] Fixed Margin doesn't work inside CollectionView EmptyView by @Dhivya-SF4094 in #29897 <details> <summary>🔧 Fixes</summary> - [Margin doesn't work inside CollectionView EmptyView](#8494) </details> - [Android, Windows] Fix CarouselView PreviousPosition/PreviousItem incorrect during animated ScrollTo() by @praveenkumarkarunanithi in #34570 <details> <summary>🔧 Fixes</summary> - [[Android] CurrentItemChangedEventArgs.PreviousItem and PositionChangedEventArgs.PreviousPosition Not Updating Correctly When Using ScrollTo or Setting Position](#29544) </details> - [iOS] CarouselView2: Update internal scroll indicators for compositional layout by @SubhikshaSf4851 in #33639 <details> <summary>🔧 Fixes</summary> - [[iOS] Horizontal Scroll Bar Not Visible on CarouselView (CV2)](#29390) </details> - [CarouselViewHandler2] Fir fox CurrentItem does not work when ItemSpacing is set by @SyedAbdulAzeemSF4852 in #32135 <details> <summary>🔧 Fixes</summary> - [[CarouselViewHandler2] CurrentItem does not work when ItemSpacing is set](#32048) </details> - [iOS] Fix for Incorrect Scroll in Loop Mode When CurrentItem Is Not Found in ItemsSource by @SyedAbdulAzeemSF4852 in #32141 <details> <summary>🔧 Fixes</summary> - [[Android & iOS] Setting an invalid CurrentItem causes scroll to last item in looped CarouselView](#32139) </details> - [Android] IndicatorView: Add TalkBack accessibility descriptions for indicators by @praveenkumarkarunanithi in #31775 <details> <summary>🔧 Fixes</summary> - [[Android] IndicatorView does not convey correct accessibility information](#31446) </details> - [iOS, macOS] Fixed CollectionView KeepLastItemInView Not Updating Correctly When Items Are Added Dynamically by @NanthiniMahalingam in #32191 <details> <summary>🔧 Fixes</summary> - [[.NET10] I9 - Scroll_Position - "KeepLastItemInView" does not keep the last item at the end of the displayed list when adding new items.](#31825) </details> - [Windows, Android] Resolved issue with dynamic Header/Footer reassignment in CollectionView. by @prakashKannanSf3972 in #28403 <details> <summary>🔧 Fixes</summary> - [[Windows, Android] Toggling Header/Footer in CollectionView Dynamically is not working](#27959) - [CollectionView HeaderTemplate and FooterTemplate are not displayed when ItemsSource is initially set to null](#28337) - [[Android] Header and Footer Not Visible in CollectionView When EmptyView is Selected First](#28351) </details> - [Android] Fix CollectionView inside disabled RefreshView blocks scroll by @Vignesh-SF3580 in #34702 <details> <summary>🔧 Fixes</summary> - [C6-The C6 page cannot scroll on Windows and Android platforms.](#34666) </details> - [Android] CollectionView: Fix SelectedItem visual state not applying when re-selecting same item by @KarthikRajaKalaimani in #31591 <details> <summary>🔧 Fixes</summary> - [CollectionView - SelectedItem visual state manager not working](#20062) </details> - [Windows] Fixed CollectionView.EmptyView can not be removed by setting it to Null by @Dhivya-SF4094 in #29487 <details> <summary>🔧 Fixes</summary> - [[Windows] CollectionView.EmptyView can not be removed by setting it to Null](#18657) - [[Windows] EmptyViewTemplate Not Working in CarouselView](#29463) - [EmptyViewTemplate does not do anything](#18551) - [[MAUI] I5_EmptyView - The data template selector cannot display the correct string.](#23330) </details> - [iOS] Support for IsSwipeEnabled on CarouselView2 by @kubaflo in #29996 <details> <summary>🔧 Fixes</summary> - [[iOS] IsSwipeEnabled Not Working on CarouselView (CV2)](#29391) </details> - [iOS, MacOS] Fixed FlowDirection not working on Header/Footer in CollectionView by @Dhivya-SF4094 in #32775 <details> <summary>🔧 Fixes</summary> - [[iOS, MacOS] FlowDirection not working on Header/Footer in CollectionView](#32771) </details> - [iOS] CollectionView: Fix drag-and-drop reordering into empty groups by @SuthiYuvaraj in #34151 <details> <summary>🔧 Fixes</summary> - [CollectionView Drag and Drop Reordering Can't Drop in Empty Group](#12008) </details> - [Android] CollectionView: Fix drag-and-drop reordering into empty groups by @SuthiYuvaraj in #31867 <details> <summary>🔧 Fixes</summary> - [CollectionView Drag and Drop Reordering Can't Drop in Empty Group](#12008) </details> - [iOS] Fix vertical CarouselView MandatorySingle snapping on iOS by @Vignesh-SF3580 in #34700 <details> <summary>🔧 Fixes</summary> - [CarouselView vertical snap points ignored on iOS with Microsoft.Maui.Controls v10.0.20 (regression from v9.0.120)](#33308) </details> - [iOS26] Fix CarouselView scrolling to wrong item when navigating to last item by @Vignesh-SF3580 in #34013 <details> <summary>🔧 Fixes</summary> - [[iOS 26] CarouselView does not scroll to the correct last item](#33770) </details> - Fixed the OnPlatform does not work for header property in Collection view by @NanthiniMahalingam in #28935 <details> <summary>🔧 Fixes</summary> - [OnPlatform does not work in Header of CollectionView](#25124) </details> - [Android] [Candidate branch] Fix VerifySelectedItemClearsOnNullAssignment, CollectionViewSelectionShouldClear, SelectedItemVisualIsCleared UI test failure on Android by @KarthikRajaKalaimani in #34928 ## DateTimePicker - [iOS] Fix for DatePicker FlowDirection Not Working on iOS by @SyedAbdulAzeemSF4852 in #30193 <details> <summary>🔧 Fixes</summary> - [[iOS] DatePicker FlowDirection Not Working on iOS](#30065) </details> ## Drawing - [Shapes] Line: Fix asymmetric Stretch.None path translation when right/bottom edge overflows by @NirmalKumarYuvaraj in #34385 <details> <summary>🔧 Fixes</summary> - [Line coordinates not computed correctly](#11404) - [Lines not drawing correctly](#26961) </details> - [Android] Fixed GraphicsView drawable is visible outside the canvas by @NirmalKumarYuvaraj in #28353 <details> <summary>🔧 Fixes</summary> - [[Android] GraphicsView, The drawn image can also be visible outside the canvas](#20834) </details> - Fixed Custom Drawable does not support binding by @NirmalKumarYuvaraj in #29442 <details> <summary>🔧 Fixes</summary> - [Custom IDrawable control does not databind to a model property when used inside a CollectionView ItemTemplate](#20991) </details> - Added a support for GradientBrushes on Shape.Stroke by @kubaflo in #22208 <details> <summary>🔧 Fixes</summary> - [GradientBrushes are not supported on Shape.Stroke](#21983) </details> ## Editor - Fixed Editor HorizontalTextAlignment does not update at run time by @NirmalKumarYuvaraj in #25129 <details> <summary>🔧 Fixes</summary> - [Editor HorizontalTextAlignment Does not Works.](#10987) - [[iOS/MacOs] Right-To-Left (RTL) alignment is not applied to Editor placeholder](#30052) </details> - [Windows] Fixed Entry Editor placeholder Text CharacterSpacing by @SubhikshaSf4851 in #30324 <details> <summary>🔧 Fixes</summary> - [[Windows] CharacterSpacing not applied to Placeholder text in Entry and Editor controls](#30071) </details> ## Entry - [Windows] Fix fo setting an Entry's Keyboard to Date causes it to be interpreted as a password input by @SyedAbdulAzeemSF4852 in #29344 <details> <summary>🔧 Fixes</summary> - [[Windows] Entry Keyboad-Type "Date" results in Password-Entry](#28975) </details> - [Android] Exception thrown when give more than 5000 characters to the Text property of Entry. by @KarthikRajaKalaimani in #30242 <details> <summary>🔧 Fixes</summary> - [Android crash when Entry has >5000 characters](#30144) </details> ## Essentials - Bump MonoApiToolsMSBuildTasksPackageVersion to 0.5.0 and ship Essentials.AI public APIs by @mattleibow via @Copilot in #34574 - [Mac] DeviceDisplay.KeepScreenOn not being respected on Mac OS by @HarishwaranVijayakumar in #32708 <details> <summary>🔧 Fixes</summary> - [[Mac Catalyst] DeviceDisplay.KeepScreenOn not being respected on Mac OS](#26059) </details> ## Flyoutpage - [Windows] FlyoutPage: update CollapseStyle at runtime by @devanathan-vaithiyanathan in #29927 <details> <summary>🔧 Fixes</summary> - [Flyout Page SetCollapseStyle doesn't have any change](#18200) </details> ## Gestures - [Android] Fix for TapGestureRecognizer doesn't fire by @HarishwaranVijayakumar in #34497 <details> <summary>🔧 Fixes</summary> - [[Android] TapGestureRecognizer doesn't fire](#5825) </details> ## Image - [Android] Fix Share.RequestAsync SecurityException on Android 10+ caused by missing ClipData by @HarishwaranVijayakumar in #34417 <details> <summary>🔧 Fixes</summary> - [[Bug] Share.RequestAsync throws java.lang.SecurityException (uid=1000) on Android 10+ due to missing intent.ClipData](#34370) </details> - [Windows]Fixed the MauiImage with logical name containing path issue by @sheiksyedm in #32864 <details> <summary>🔧 Fixes</summary> - [MauiImage with LogicalName containing path - is not working on Windows](#32356) </details> - [Android, Windows & iOS] Fix Downsize/ScaleImage to maintain aspect ratio and prevent upscaling by @SyedAbdulAzeemSF4852 in #30808 <details> <summary>🔧 Fixes</summary> - [[Android & Windows] In GraphicsView, the aspect ratio is not maintained when Downsize is called with both maxWidth and maxHeight](#30803) </details> ## Label - [iOS , macOS] Fixed Label text cropping when a width request is specified on the label inside a VerticalStackLayout with specified width request by @NanthiniMahalingam in #29166 <details> <summary>🔧 Fixes</summary> - [Label text gets cropped when a width request is specified on the label inside a VerticalStackLayout](#28660) - [[iOS] Label with a fixed WidthRequest has wrong height](#26644) </details> - [Android] Fix Label word wrapping clips text depending on alignment and layout options by @Dhivya-SF4094 in #34533 <details> <summary>🔧 Fixes</summary> - [Bug: Android Label word wrapping clips text depending on alignment and layout options](#34459) </details> - LineHeight and decorations for HTML Label - fix by @kubaflo in #31202 <details> <summary>🔧 Fixes</summary> - [LineHeight with HTML Label not working](#22193) - [lineheight is broken ](#22197) </details> - [iOS] Fix Label with TailTruncation not rendering after empty-to-non-empty text transition by @kubaflo in #34812 <details> <summary>🔧 Fixes</summary> - [Label with LineBreakMode="TailTruncation" does not render text if initial Text is null or empty on first render (iOS)](#34591) </details> ## Layout - [Android] Fix overflowing children clipped when parent Opacity < 1 by @SyedAbdulAzeemSF4852 in #34565 <details> <summary>🔧 Fixes</summary> - [Maui Android parent view inappropriately creates clipping mask when its opacity is less than 1, cropping out children](#22038) </details> - Fixed the FlexLayout reverse issue with the AlignContent by @Ahamed-Ali in #32134 <details> <summary>🔧 Fixes</summary> - [FlexLayout alignment issue when Wrap is set to Reverse and AlignContent is set to SpaceAround, SpaceBetween or SpaceEvenly](#31565) </details> - [iOS/Mac] Fixed BoxView in AbsoluteLayout did not return to its default AutoSize for Height and Width after reset by @Dhivya-SF4094 in #31648 <details> <summary>🔧 Fixes</summary> - [[iOS, Catalyst] BoxView in AbsoluteLayout does not return to default AutoSize for Height/Width after reset](#31496) </details> ## Map - [Windows] Implement WinUI 3 MapControl handler using Azure Maps by @jfversluis in #34138 ## Modal - [Android] PopToRootAsync for modal pages - improvements by @kubaflo in #26851 <details> <summary>🔧 Fixes</summary> - [Shell PopToRootAsync doesn't happen instantly - previous pages flash quickly. Only happens in NET 9](#26846) </details> - [Android] Fix HideSoftInputOnTapped doesn't work on Modal Pages by @HarishwaranVijayakumar in #34770 <details> <summary>🔧 Fixes</summary> - [HideSoftInputOnTapped doesn't work on Modal Pages](#34730) </details> ## Navigation - [iOS] Alert popup may be displayed on wrong window when modal page navigation is in progress - fix by @kubaflo in #31016 <details> <summary>🔧 Fixes</summary> - [Alert popup may be displayed on wrong window when modal page navigation is in progress on iOS/MacOS](#30970) </details> - [Android] Page: Fix OnNavigatedTo called twice when NavigationPage is FlyoutPage Detail by @KarthikRajaKalaimani in #31931 <details> <summary>🔧 Fixes</summary> - [NavigationPage and FlyoutPage both call OnNavigatedTo, so it is called twice](#23902) </details> ## Picker - Fixed the Picker didn't dismiss it when tapping outside on iOS and MacCatalyst platform. by @KarthikRajaKalaimani in #30067 <details> <summary>🔧 Fixes</summary> - [[regression/8.0.3] iOS Picker dismiss does not work when clicking outside of the Picker](#19168) </details> - [Windows] Fixed Picker items width wont resize back by @SubhikshaSf4851 in #33042 <details> <summary>🔧 Fixes</summary> - [Picker items width won't resize back when its container window gets resized down.](#32984) </details> ## RadioButton - Fix TalkBack not correctly narrating RadioButtons with Content by @SubhikshaSf4851 in #34521 <details> <summary>🔧 Fixes</summary> - [[Android] TalkBack does not correctly narrate RadioButtons with Content](#34322) </details> ## SafeArea - [Android] Fix SafeAreaShouldWorkOnAllShellTabs test failure on API 36 by @praveenkumarkarunanithi in #34239 ## ScrollView - [iOS] Preserve ScrollView offsets when Orientation changes to Neither by @Vignesh-SF3580 in #34672 <details> <summary>🔧 Fixes</summary> - [Incorrect implementation of ScrollView.Orientation](#34583) </details> ## Searchbar - [Android] Fix SearchBar text bleeding between instances after navigation by @SyedAbdulAzeemSF4852 in #34703 <details> <summary>🔧 Fixes</summary> - [MAUI Android: SearchBar copies content from one to the other](#20348) </details> - Fixed SearchBar CursorPosition and SelectionLength not updating when typing by @Dhivya-SF4094 in #34347 <details> <summary>🔧 Fixes</summary> - [SearchBar - CursorPosition and SelectionLength are not updated when the user types](#30779) </details> ## SearchBar - [Windows] Fixed SearchHandler issues by @Tamilarasan-Paranthaman in #29520 <details> <summary>🔧 Fixes</summary> - [[Windows] SearchHandler APIs are not functioning properly](#29493) </details> ## Shell - [iOS, Mac] Fix for Background set to Transparent doesn't have the same behavior as BackgroundColor Transparent by @HarishwaranVijayakumar in #32245 <details> <summary>🔧 Fixes</summary> - [Background set to Transparent doesn't have the same behavior as BackgroundColor = Transparent](#22769) </details> - [iOS] Fix App crash with NullReferenceException in ShellSectionRenderer by @devanathan-vaithiyanathan in #32109 <details> <summary>🔧 Fixes</summary> - [[iOS] App crash with NullReferenceException in ShellSectionRenderer](#31961) </details> - [Android] Fixed back button icon selection logic in ShellToolbarTracker by @kubaflo in #32080 <details> <summary>🔧 Fixes</summary> - [IconOverride in Shell.BackButtonBehavior does not work.](#32050) </details> - Fix TabBarIsVisible Not Updating Dynamically When Set on ShellContent by @Vignesh-SF3580 in #33090 <details> <summary>🔧 Fixes</summary> - [Shell.TabBarIsVisible is not updated dynamically at runtime](#32994) </details> - [iOS, macOS] Shell: Fix RTL flow direction for flyout, menu cells, tab bar, and Locked flyout position by @NanthiniMahalingam in #32701 <details> <summary>🔧 Fixes</summary> - [[iOS, Mac Catalyst] Shell Flyout and Content Do Not Fully Support RightToLeft (RTL)](#32419) </details> - [IOS] Inconsistent Resize Behavior for Header/Footer - fix by @kubaflo in #28713 <details> <summary>🔧 Fixes</summary> - [[IOS, Mac] Inconsistent Resize Behavior for Header/Footer](#26397) - [Enable Shell Flyout Header/Footer resize tests on iOS/Catalyst](#33501) </details> - [Android] Fix for SearchHandler retaining previous page SearchView data in pages within Shell sections by @BagavathiPerumal in #29545 <details> <summary>🔧 Fixes</summary> - [[Shell][Android] The truth is out there...but not on top tab search handlers](#8716) </details> - [Android] Fix empty space above TabBar after navigating back when TabBar visibility is toggled by @praveenkumarkarunanithi in #34324 <details> <summary>🔧 Fixes</summary> - [Empty space appears above TabBar after navigating back when TabBar visibility is toggled](#33703) - [Grid with SafeAreaEdges=Container has incorrect size when tab bar appears](#34256) </details> ## SwipeView - [Android] SwipeView: Use MeasureSpecMode.Exactly for SwipeItem layout to fix text visibility by @Ahamed-Ali in #27399 <details> <summary>🔧 Fixes</summary> - [[Android] Right SwipeView items are not visible in the SwipeView.](#27367) </details> - [Android] Prevent the tap that closes an open SwipeView from being propagated to children by @sjordanGSS in #24275 <details> <summary>🔧 Fixes</summary> - [Tapping to close a SwipeView will activate TapGestureRecognizers on .Content](#23921) </details> ## Switch - [iOS & Mac] Fix for SearchHandler retains previous page state when switching top tabs by @BagavathiPerumal in #34735 <details> <summary>🔧 Fixes</summary> - [[Shell] [iOS & Mac] SearchHandler retains previous page state when switching top tabs](#34693) </details> ## TabbedPage - [Android] Fixed NullReferenceException in app with TabBar after returning from minimized state by @NirmalKumarYuvaraj in #34779 <details> <summary>🔧 Fixes</summary> - [NullReferenceException in app with TabBar after returning from minimized state](#34720) </details> ## Titlebar - Fixed BindingContext of the Window TitleBar is not being passed on to its child content. by @NirmalKumarYuvaraj in #30080 <details> <summary>🔧 Fixes</summary> - [The BindingContext of the Window TitleBar is not being passed on to its child content.](#24831) </details> - [Windows/Mac] Fix RTL FlowDirection causes overlap with native window control buttons in TitleBar by @devanathan-vaithiyanathan in #30400 <details> <summary>🔧 Fixes</summary> - [[Windows, Mac] RTL FlowDirection causes overlap with native window control buttons in TitleBar](#30399) </details> ## WebView - [Windows] Fix WebView background color not being applied by @SubhikshaSf4851 in #34599 <details> <summary>🔧 Fixes</summary> - [WebView background color has changed after update, can't override.](#34518) </details> - [Android] Fix for WebView/HybridWebView briefly flashes full screen before layout completes by @praveenkumarkarunanithi in #33207 <details> <summary>🔧 Fixes</summary> - [[Android] HybridWebView briefly resizes to full screen when page is opened before snapping back to correct size](#31475) </details> ## Xaml - Improved style inheritance by @kubaflo in #31317 <details> <summary>🔧 Fixes</summary> - [Styles based on a style that is based on another style that uses AppThemeBinding do not inherit properties correctly.](#31280) </details> - Fix for VisualStateManager Setter.TargetName failing when ControlTemplate is applied by @BagavathiPerumal in #33208 <details> <summary>🔧 Fixes</summary> - [Setter.TargetName + ControlTemplate crash](#26977) </details> <details> <summary>🧪 Testing (4)</summary> - [Testing] Additional Feature Matrix Event Test Cases for Slider and ScrollView by @nivetha-nagalingam in #34352 - [Testing] Fixed Build error on inflight/ candidate PR 34885 by @NafeelaNazhir in #34891 - [Testing] Fixed UI test image failure in PR 34885 - [13/4/2026] by @NafeelaNazhir in #34933 - Fixed test failure - CursorPositionUpdatesWhenSearchBarGainsFocus by @Dhivya-SF4094 in #34938 </details> <details> <summary>📦 Other (3)</summary> - Fix Loaded event not called for MAUI View added to native View by @NirmalKumarYuvaraj in #34345 <details> <summary>🔧 Fixes</summary> - [Loaded event not called for MAUI View added to native View](#34310) </details> - Add public IAlertManager and IAlertManagerSubscription interfaces by @Redth in #34228 <details> <summary>🔧 Fixes</summary> - [Alert/Dialog system (`DisplayAlert`, `DisplayActionSheet`, `DisplayPromptAsync`) needs a public extensibility point](#34104) </details> - Fix crash when displaying alerts on unloaded pages by @kubaflo in #33288 </details> <details> <summary>📝 Issue References</summary> Fixes #5825, Fixes #8494, Fixes #8716, Fixes #10987, Fixes #11404, Fixes #12008, Fixes #18200, Fixes #18551, Fixes #18657, Fixes #18701, Fixes #19168, Fixes #19209, Fixes #20062, Fixes #20348, Fixes #20834, Fixes #20991, Fixes #21983, Fixes #22038, Fixes #22193, Fixes #22197, Fixes #22769, Fixes #23330, Fixes #23854, Fixes #23902, Fixes #23921, Fixes #24304, Fixes #24831, Fixes #25124, Fixes #26059, Fixes #26397, Fixes #26644, Fixes #26846, Fixes #26961, Fixes #26977, Fixes #27086, Fixes #27367, Fixes #27959, Fixes #28337, Fixes #28351, Fixes #28660, Fixes #28975, Fixes #29390, Fixes #29391, Fixes #29463, Fixes #29493, Fixes #29544, Fixes #30052, Fixes #30065, Fixes #30071, Fixes #30144, Fixes #30399, Fixes #30779, Fixes #30803, Fixes #30970, Fixes #31280, Fixes #31446, Fixes #31475, Fixes #31496, Fixes #31565, Fixes #31825, Fixes #31961, Fixes #32048, Fixes #32050, Fixes #32139, Fixes #32356, Fixes #32419, Fixes #32771, Fixes #32944, Fixes #32984, Fixes #32994, Fixes #33308, Fixes #33501, Fixes #33703, Fixes #33770, Fixes #33773, Fixes #34104, Fixes #34256, Fixes #34257, Fixes #34310, Fixes #34322, Fixes #34363, Fixes #34370, Fixes #34459, Fixes #34518, Fixes #34583, Fixes #34591, Fixes #34666, Fixes #34693, Fixes #34720, Fixes #34730 </details> **Full Changelog**: main...inflight/candidate
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Description:
Dragging and dropping an item into an empty group in the CollectionView was failing. The item could not be dropped because the drag-and-drop logic was not handling empty groups correctly.
RootCause:
The OnMove method controls drag-and-drop behaviour in CollectionView. When dropping into an empty group, the only element present is the group header, which has a different ItemViewType than normal items. Because of this mismatch, the check inside OnMove prevented the drop operation from completing.
Description of Change
Updated the condition in OnMove to validate that the dragged item is a record, allowing drops into empty groups.
Issues Fixed
Fixes #12008
Tested the behaviour in the following platforms
Output Screenshot
12008before.mov
12008Final.mov