如何增加 Virtualized Flex 4 布局中的缓冲区
虚拟布局很好,但我发现由于虚拟范围的“紧密”,它们常常感觉有点“笨重”。这可以通过增加范围来改进 - 向前(和向后)一两步通常足以提高列表的“响应能力”,特别是当需要加载外部资源(如图像)时。
如何实现这一点呢?
Virtualized Layouts are nice, but I find that they often feel a bit "chunky" due to the "tightness" of the virtual range. This could be improved by increasing the range - one or two steps ahead (and behind) would often be enough to improve the "responsiveness" of the list, especially when external resources (like images) need to be loaded.
How could one implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的起点可能应该是 DataGroup.getVirtualElementAt(...)
这是一个复杂的主题,您可能必须定义自己的自定义布局来处理额外的虚拟化行为,以及 DataGroup 的一些元素来防止 IR以免过早被垃圾收集。
不过,您面临着相当大的风险……这不是一条容易的路线!
Your starting spot should probably be DataGroup.getVirtualElementAt(...)
It's a complicated subject, and you'd probably have to define both your own custom layout to deal with the additional virtualisation behaviour, and some elements of the DataGroup to prevent the IRs from being garbage collected too soon.
You are running a fair risk though... this isn't an easy route!