e.CenterItemIndex 变为 0,每次 group 发生变化OS

问题描述

我在 iOS 的 collectionView 中使用 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

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)