-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] SwipeView used in a CollectionView fires the SelectionChangedCommand unintentionally #12736
Conversation
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? |
@rachelkang Could you try again? The behavior should be the same on Android and iOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer seeing the different behaviors described in last comment
|
||
return x > outRect.Left && x < outRect.Right && y > outRect.Top && y < outRect.Bottom; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you move this code up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build is failing
D:\agent\1\s\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj" (GetTargetFrameworks target) (9:21) ->
D:\agent\1\s\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj(160,3): error MSB4024: The imported project file "D:\agent\1\s\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" could not be loaded. The 'EmbeddedResource' start tag on line 2026 position 6 does not match the end tag of 'ItemGroup'. Line 2078, position 5.
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 |
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
API Changes
None
Platforms Affected
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