简体   繁体   English

列表刷新,Flex中的项目渲染器

[英]List refresh, item renderer in Flex

I have a List and the item renderer displays an image and text from xml (news rss). 我有一个列表,项目渲染器显示xml(新闻rss)中的图像和文本。 Not all news have an image. 并非所有新闻都有图像。 Whenever you scroll the list, and the item renderer refreshes, it move images of news of a position, so the news "1" have the image of news "2", and the news "2" have the image of news "3" ecc., but the text (the title of news not move) . 每当滚动列表并刷新项目渲染器时,它都会移动位置新闻的图像,因此新闻“ 1”具有新闻“ 2”的图像,新闻“ 2”具有新闻“ 3”的图像ecc。,但文字(新闻标题未移动)。 how can I do? 我能怎么做? thanks and sorry for my english. 谢谢,抱歉我的英语。

I presume you're using a custom item renderer? 我想您正在使用自定义项目渲染器?

Where are you setting the icon? 您在哪里设置图标? If you set the icon in this function : 如果您在此功能中设置图标:

[override] public function set data(value:Object)

it should update with the scroll. 它应该随着滚动而更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM