This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] FirstVisibleItemIndex and LastVisibleItemIndex is wrong of CollectionView's Scrolled Event's ItemsViewScrolledEventArgs in iOS #11695
Labels
Description
When a CollectionView Scrolled events fired in ios, Even'ts ItemsViewScrolledEventArgs.FirstVisibleItemIndex and ItemsViewScrolledEventArgs.LastVisibleItemIndex is wrong. It works fine in Android but provide -2 for the FirstVisibleItemIndex then it is actually and +2 for the LastVisibleItemIndex. On Initial Phase it provide correct value for FirstVisibleItemIndex (e.g; is 0) but + for the LastVisibleItemIndex. once you scoll to up it start providing incorrect index for FirstVisibleItemIndex as well.
Here I provided a sample application which shows the number in collection view starting with 0 and can be between 30 to 50 randomly. At the bottom of the page, it has two labels which show the first visible item index and last visible item index respectively.
Steps to Reproduce
Expected Behavior
The FirstVisibleItemIndex and LastVisibleItemIndex should be provide correct result.
Actual Behavior
Both FirstVisibleItemIndex and LastVisibleItemIndex provides -2 for the FirstVisibleItemIndex and +2 for the LastVisibleItemIndex then the actual visible item index on the screen.
Basic Information
Screenshots
Reproduction Link
Please download the attached project and run it on ios simulator.
CollectionViewVisibleIndexTest.zip
The text was updated successfully, but these errors were encountered: