如何解决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 举报,一经查实,本站将立刻删除。