Xamarin.Forms
Xamarin.Forms copied to clipboard
[Android] SwipeView used in a CollectionView fires the SelectionChangedCommand unintentionally
Description of Change
Avoid fire the CollectionView SelectionChangedCommand event if the user tap a Button for example. With the change from this PR, the behavior is the same the behavior as without using SwipeView.
Issues Resolved
- fixes #11982
API Changes
None
Platforms Affected
- Android
Behavioral/Visual Changes
None
Before/After Screenshots
Before

After

Testing Procedure
Launch Core Gallery and navigate to the issue 11982. In the CollectionView using the SwipeView, tap the Button. If not trigger the SelectionChanged, the test has passed.
PR Checklist
- [ ] Targets the correct branch
- [ ] Tests are passing (or failures are unrelated)
Added changes to fix the build error.
Perhaps not within the scope of this PR, but what's the expected behavior on iOS? I'm seeing that it's different on iOS than on Android
Also, what's the expected behavior when clicking on the "Command" button itself? I sometimes get the dialog and I sometimes see the "-PRESSED" added on
@jsuarezruiz build is failing
@jsuarezruiz can we UITest this?
Sure

@rachelkang Could you try again? The behavior should be the same on Android and iOS.
Not sure if this fix is still correct and seeing where we are in the Xamarin lifecycle, we probably won't be merging this anymore