我在collectionView
iOS 中使用 Scrolled 事件。如果CollectionView
包含组,e.CenterItemIndex
则每次组发生变化时变为 0。有什么办法可以解决这个问题吗?
private void CollectionViewtems_Scrolled(object sender, ItemsViewScrolledEventArgs e)
{
var centerItemIndex=e.CenterItemIndex;
}
在 iOs 上:当一组collectionView
将发生变化时,它又从 0 开始;在 iOS 上滚动时的示例:
Index is 0
Index is 1
Index is 2
Index is 3
Index is 4
Index is 5 //After that index group will change
Index is 0
Index is 1
Index is 2 //And after that index group will change again
Index is 0
Index is 1
Index is 2
Index is 3
Index is 4
另一方面在 Android 索引将有一个连续的增量
Index is 0
Index is 1
Index is 2
Index is 3
Index is 4
Index is 5 //After that index group will change
Index is 6
Index is 7
Index is 8 //And after that index group will change again
Index is 9
Index is 10
Index is 11
Index is 12
Index is 13