ListView,大数据集和ensureVisible。 [英] ListView, large datasets and ensureVisible.

查看:271
本文介绍了ListView,大数据集和ensureVisible。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我认为这可能是计算ListView中位置的一个错误。

I think it may be a bug in calculation of position in ListView.

我有一个包含大型数据源的列表视图(约65,000条记录)。每件商品的尺寸为250 x  24 px。 

I have a listview with a large datasource (about 65 000 records). Each item has a size of 250 x  24 px. 

,而itemIndex低于约25 000,方法ensureVisible有效:该商品位于第一个可见列中列表视图。

while the itemIndex is lower than around 25 000, the method ensureVisible works : the item is in the first visible column of the listview.

但之后,计算中存在一个错误: 

But after, there is a bug with the calculation : 

- newPos计算。

- the newPos is calculate.

- listView尝试滚动到该项目,但滚动不够好!因此listView请求数据源中的另一个插槽。

- the listView try to scrolls to the item, but the scroll is not good enough ! Therefore the listView requests an other slot in the datasource.

如果我更改项目的大小(400x48),则错误更大..

If i change the size of the item (400x48), bigger is the error..

编辑:

尺码320 x 240px,一个1366 x 614px的视口(处置我有1366x614.4?!)

With a size of 320 x 240px, a viewport of 1366 x 614px (in disposition i have 1366x614.4 ?!)

直到itemIndex< = 9290,  listView.indexOfFirstVisible工作,itemTemplate工作。

until itemIndex <= 9290,  listView.indexOfFirstVisible works and the itemTemplate works.

在itemIndex = 9298之后:listView.indexOfFirstVisible和itemTemplate不起作用(占位符灰色。数据已正确获取)。

after itemIndex = 9298 : listView.indexOfFirstVisible and itemTemplate don't work  (placeholder gray. Datas have been correctly fetched).

with itemIndex = 25 000:listView.indexOfFirstVisible显示范围[9288,9297]

with itemIndex = 25 000 : listView.indexOfFirstVisible shows me the range [9288, 9297]

推荐答案

抱歉......我不知道有一个答案,但我很好奇有关数据量的ListView的性能。  我有一种感觉会很慢。

Sorry...I don't have an answer for you, but I am curious about performance of the ListView with that amount of data.  I have a feeling that would be really slow.

Dave


这篇关于ListView,大数据集和ensureVisible。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆