在火花清单上设置角落半径Flex 4 air mobile

问题描述:

我在我的Flex移动应用程序中创建了一个火花列表,我希望像iPhone上的角落半径列表那样做。 不幸的是,在列表样式中没有cornerRadius或简单的半径。在火花清单上设置角落半径Flex 4 air mobile

我所说的列表视图:

<s:List id="language" width="100%" height="70" borderVisible="true" 
        change="navigator.pushView(LanguageView)" dataProvider="{languageCell}" 
        itemRenderer="skins.CustomCellStyle1"/> 

然后我打电话的itemRenderer:

<?xml version="1.0" encoding="utf-8"?> 
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
       xmlns:s="library://ns.adobe.com/flex/spark" 
       width="100%" height="70"> 
    <s:HGroup width="100%" verticalCenter="0" paddingLeft="15" paddingRight="15"> 
     <s:Label text="{data.label}"/> 
     <s:Spacer width="100%"/> 
     <s:Label text="{data.content}" 
       textAlign="right" 
       color="0x046380" paddingRight="5"/>   
     <s:BitmapImage id="icon" 
         source="{data.mark}" 
         verticalCenter="0"/> 
    </s:HGroup> 
</s:ItemRenderer> 

因此,如何能我使用圆角半径在我的电池?

http://viconflex.blogspot.com/2008/05/sometimes-cornerradius-just-isnt-enough.html

两个小技巧的程序员刚刚接触...如果你想在喜欢的VBox,HBox中,帆布等mx.containers圆角的边框样式,以固体和了borderThickness设置为0,然后将你的cornerRadius设置为任何你想要的。如果borderStyle保持为none(默认),cornerRadius属性似乎中断并且无效。

第二个技巧,如果你想在面板的顶部和底部有圆角,那么有一个属性叫roundedBottomCorners,它的默认值为false。设置为true时,您会看到舍入顶部和底部。

+1

请将相关部分粘贴到您的答案中,如果该博客发生故障,仍然可以在此处访问! – dain 2011-06-02 13:25:14

+0

谢谢,这是我需要^^ – Didi 2011-06-03 07:09:47