Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Fix item fading when moving between groups in Grouped CollectionView #24461

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

Vignesh-SF3580
Copy link
Contributor

@Vignesh-SF3580 Vignesh-SF3580 commented Aug 27, 2024

Root Cause

In the ObservableItemsSource class, the CollectionChanged event was directly removed in the Dispose method instead of using the WeakNotifyCollectionChangedProxy.Unsubscribe(). This caused incorrect event handling, leading to a visual glitch where both the selected and the next item temporarily faded in a grouped CollectionView on Android.

Description of Change

The fix involved correctly unsubscribing from the CollectionChanged event using WeakNotifyCollectionChangedProxy.Unsubscribe() in the Dispose method. This change ensures proper event handling, preventing unintended visual effects during item movements in a grouped CollectionView.

Reference

https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/Handlers/Items/CarouselViewHandler.Windows.cs#L56

Issues Fixed

Fixes #23152
Fixes #21698
Fixes #23138

Output

Before

GroupedCollectionViewBeforeFix

After:

GroupedCollectionViewAfterFix

…sults in the temporary fading out of two items instead of one on Android
Copy link
Contributor

Hey there @Vignesh-SF3580! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Aug 27, 2024
@Vignesh-SF3580
Copy link
Contributor Author

Issue is related to animation, test case is not included.

@Vignesh-SF3580 Vignesh-SF3580 marked this pull request as ready for review August 27, 2024 13:24
@Vignesh-SF3580 Vignesh-SF3580 requested a review from a team as a code owner August 27, 2024 13:24
@jfversluis
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen enabled auto-merge (squash) August 27, 2024 21:33
@samhouts samhouts added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Aug 27, 2024
@rmarinho rmarinho disabled auto-merge August 28, 2024 10:56
@rmarinho rmarinho merged commit 36994dc into dotnet:main Aug 28, 2024
95 of 97 checks passed
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Sep 5, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.2.24503.2 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Oct 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution fixed-in-9.0.0-rc.2.24503.2 partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
6 participants