0
我想在我的Flex移动项目中添加一个图标到视图列表。我不知道如何解决这个问题。这是代码行,下面是视图的图像。如何将图标添加到Adobe Flex移动项目中的视图列表
<s:List id="calcList" width="100%" height="98%" alternatingItemColors="[#0099999,#990000]"
change="calcList_changeHandler(event)" color="#FFFAF0" contentBackgroundColor="#fffdd0"
fontWeight="normal" labelField="name" textAlign="left" >
<s:dataProvider>
<s:ArrayCollection id="calcListCollection">
<fx:Object viewID="A1c" name="A1c " category="Medical"/>
<fx:Object viewID="BMI" name="BMI " category="Fitness"/>
<fx:Object viewID="GPA" name="GPA " category="Education"/>
<fx:Object viewID="Tip" name="Tip " category="Personal" />
</s:ArrayCollection>
</s:dataProvider>
</s:List>
使用自定义itemRenderer。 Adobe在移动SDK中包含一个:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/IconItemRenderer.html,您应该可以使用它来达到您的目的。 – JeffryHouser
谢谢,我会给这个镜头。 –
此解决方案完美无瑕,但我相信我没有在需要的部分添加其他部分。根据计算器的选择,我需要图标有所不同。例如,A1c图标将与GPA,TIP和BMI图标不同。 –