[Bug] FirstVisibleItemIndex is wrong when scrolling CollectionView on iOS #9989
Comments
Adding the reproduction here on GitHub as well so we won't lose it. Confirmed this is happening with the reproduction. I have played around with the |
This is pretty important for us to get code scrolling to work... anyone know of a work-around to get the first visible item index? |
Really wish this wasn't an issue |
It's a little ugly, but here's a work-around for iOS using a custom renderer |
With XF 5.0.0.2012, problem still exists. |
Has anyone else found a viable work around for this? Using InquisitorJax's solution doesn't seem to work for me (The ScrollTo method no longer works). Have a horizontal list the user can scroll, or tap an arrow to move right and left one item at a time, this bug is keeping it from working well. |
Description
When listening to the Scrolled-event on a CollectionView using LinearItemsLayout(ItemSpacing="10", Orientation="Vertical", SnapPointsAlignment="Start", SnapPointsType="Mandatory"), the ItemsViewScrolledEventArgs.FirstVisibleItemIndex returns an index 1 number lower than the actual value on the iOS platform. Seems to work fine on the Android platform.
Steps to Reproduce
Expected Behavior
The Label below the CollectionView should display the index of the item aligned at the top.
Actual Behavior
The Label below the CollectionView displays 1 number lower than the expected value.
Basic Information
Reproduction Link
https://drive.google.com/open?id=1Ci6NjRY9KvE3RbYSDZQ4f0pV1IsGY_LN
The text was updated successfully, but these errors were encountered: