Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] SwipeView used in a CollectionView fires the SelectionChangedCommand unintentionally #12736

Closed
wants to merge 17 commits into from

Conversation

jsuarezruiz
Copy link
Contributor

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

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

Before

issue11982

After

fix11982

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)

@jsuarezruiz
Copy link
Contributor Author

Added changes to fix the build error.

@rachelkang rachelkang self-requested a review December 3, 2020 21:06
@rachelkang
Copy link
Contributor

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

@rmarinho rmarinho added this to the 5.0.0 milestone Dec 16, 2020
@rmarinho rmarinho requested a review from hartez December 16, 2020 23:32
@rmarinho
Copy link
Member

@jsuarezruiz build is failing

@rmarinho
Copy link
Member

@jsuarezruiz can we UITest this?

@jsuarezruiz
Copy link
Contributor Author

jsuarezruiz commented Dec 18, 2020

Sure
Captura de pantalla 2020-12-18 a las 18 49 03

@jsuarezruiz
Copy link
Contributor Author

@rachelkang Could you try again? The behavior should be the same on Android and iOS.

Copy link
Contributor

@rachelkang rachelkang left a 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;
}

Copy link
Contributor

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?

Copy link
Member

@rmarinho rmarinho left a 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.

@PureWeen PureWeen modified the milestones: 5.0.0, 5.0.1 Dec 30, 2020
@hartez hartez removed their request for review September 14, 2022 14:56
@jfversluis
Copy link
Member

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

@jfversluis jfversluis closed this Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview a/swipeview blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. p/Android t/bug 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [Android] SwipeView used in a CollectionView fires the SelectionChangedCommand unintentionally
6 participants