Flex list中的每个item的背景各不相同的解决方案:

1.在ItemRenderer中用Group或其他可以添加背景图片的容器

2.最关键的一点:需要先用Embed来绑定

[Embed(source='assets/p_w_picpaths/mdpi/01.png')]
[Bindable]
private var bq1:Class;

3.做为背景图片的代码:data.photo是一个Class

<s:Rect width="100%" height="100%">
<s:fill>
<s:BitmapFill source="{data.photo}"/>
</s:fill>
</s:Rect>

 

本文出自 “Java@Flex” 博客,请务必保留此出处http://hackbomb.blog.51cto.com/1617027/844663