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

CollectionView OnCollectionViewScrolled Calls and parameters are inconsistent or incorrect #25649

Closed
david-maw opened this issue Nov 3, 2024 · 1 comment · Fixed by #26468
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@david-maw
Copy link

david-maw commented Nov 3, 2024

Description

OnCollectionViewScrolled has a parameter that includes FirstVisibleItemIndex and LastVisibleItemIndex. It is not initially called in Windows but when it eventually is the values seem to be correct. On Android it is called initially, but the values are not correct (usually they are off by 1)

Steps to Reproduce

Forst clone the repository then build and run the app on Windows, you should see this:

Now build and run it on Android and you should see this:

Note that the "parameter" information indicates "Item 0 to Item 2", this is derived from a call on OnCollectionViewScrolled and there are two things to note:

  1. The same call was not made on Windows (the information was blank)
  2. The LastVisibleItemIndex value is 2 but the last visible item is actually at index 1.

Now check the "long list" box at the bottom of the page and the CollectionView will be populated with a longer list. Scroll it up one item and you'll see this:

  1. On the screen you can see item 1 through most of item 7 but the call on OnCollectionViewScrolled indicated "Item 2 to Item 8"

  2. Finally, go back to Windows and try the long list, note that SnapPointsType="Mandatory" seems to have no effect.

Link to public reproduction project repository

https://github.com/david-maw/OnCollectionViewScrolled.git

Version with bug

9.0.0-rc.2.24503.2

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

Android 11 Windows 11

Did you find any workaround?

No, it fails both in .NET 8 and 9.

Relevant log output

No response

@david-maw david-maw added the t/bug Something isn't working label Nov 3, 2024
@jaosnz-rep jaosnz-rep added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed platform/windows 🪟 platform/android 🤖 labels Nov 4, 2024
@jaosnz-rep
Copy link

jaosnz-rep commented Nov 4, 2024

I can repro this issue at Windows & Android platform on the latest 17.12.0 preview 5(9.0.0-rc.1.24453.9 & 9.0.0-rc.2.24503.2 & 8.0.82).

@samhouts samhouts added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Nov 6, 2024
@mattleibow mattleibow added this to the Backlog milestone Nov 12, 2024
@vishnumenon2684 vishnumenon2684 self-assigned this Nov 29, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 4, 2024
@rmarinho rmarinho modified the milestones: Backlog, .NET 9 SR3 Jan 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
7 participants