xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k stars 471 forks source link

[Bug] Android LongPress on CollectionView breaks ObservableCollection functionality #1598

Open jantanis opened 3 years ago

jantanis commented 3 years ago

Description

Adding TouchEffect LongPress on a CollectionView breaks the functionality of the ObservableCollection bound to SelectedItems. Perhaps this is linked to #760.

Steps to Reproduce

  1. Open and start Sample project on Android
  2. Select Item 4 and Item 6
  3. Deselect Item 4

Expected Behavior

Debug.WriteLine output: e.Action: Add e.Action: Add e.Action: Remove

Actual Behavior

Debug.WriteLine output: e.Action: Reset e.Action: Add e.Action: Reset e.Action: Add e.Action: Add e.Action: Reset e.Action: Add

Basic Information

Reproduction Link

XCT.Sample.zip

AndreiMisiukevich commented 3 years ago

https://github.com/xamarin/XamarinCommunityToolkit/issues/1568

Duplicate?

jantanis commented 3 years ago

1568

Duplicate?

It could be triggering the same behavior, but it's triggered in a different manner. So I can't say it's a duplicate.

AndreiMisiukevich commented 3 years ago

@jantanis can you try the latest build from the nightly package? (you can check Readme to get the nuget source where it can be installed from)

jantanis commented 3 years ago

@AndreiMisiukevich I did with 1.1.0-preview1096, but no luck:

e.Action: Reset e.Action: Add e.Action: Reset e.Action: Add e.Action: Add e.Action: Reset e.Action: Add

mhrastegari commented 3 years ago

I also have a problem in CollectionView! when i'm scrolling the LongPressCommand fires and the pressed scale remains and doesn't come back to normal!

should i create another issue or it'll be a duplicate?

jantanis commented 3 years ago

I also have a problem in CollectionView! when i'm scrolling the LongPressCommand fires and the pressed scale remains and doesn't come back to normal!

should i create another issue or it'll be a duplicate?

Create a new one. I don't think this is de same issue as yours. Perhaps related, but a different issue.

RemcoDEV commented 2 years ago

This happens to more than just collectionviews. We add a longpress touch effect to all labels. All other (short tap / xamarins default tap) gesture recognizers earlier in the tree are not fired when you click on a label with a long press effect. If you need a reproduction scenario, please let me know.