如何获得在星火列表与虚拟布局可见的项目 [英] How to get the visible items on a Spark List with virtual layout

查看:185
本文介绍了如何获得在星火列表与虚拟布局可见的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有:

  • 在数字的ArrayCollection;
  • 使用上述ArrayCollection的,因为它的dataProvider一个列表,并virtualLayout = TRUE;
  • 在自定义的ItemRenderer这显示了一个标签: 一个)的数量 二)根据数的y位置和最高数量可见
  • an ArrayCollection of Numbers;
  • a List using the above ArrayCollection as it's dataprovider, and virtualLayout=true;
  • a custom ItemRenderer that shows a label with: a) the number b) an y position depending on the number AND the highest number visible

在另一个词语,如果我有10个号码中的交流,只有5出现在屏幕上,这些5的y位置将依赖于最大数量的那些5.当用户滚动,当然该值这5个元素的改变,因此标签的项目渲染的位置将发生改变。

In another words, if I have 10 numbers in the AC, and only 5 appear on the screen, the y position of those 5 will depend on the value of the maximum number for those 5. When the user scrolls, of course those 5 elements change so the position of the label in item renderers will change.

我的问题:

1)怎样才能是当前看得见的项目清单? 2)哪些事件/方法重写将帮助我知道的名单滚动/可见项目改变了吗?

1) How can I get the list of items that are "currently" visible? 2) Which event/method to override will help me know that the List was scrolled/the visible items changed?

感谢您,

若昂Saleiro

推荐答案

getItemIndicesInView():矢量< INT> 返回该项目的索引渲染可见此DataGroup中。

getItemIndicesInView():Vector.<int> Return the indices of the item renderers visible within this DataGroup.

这篇关于如何获得在星火列表与虚拟布局可见的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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