【问题标题】:Flex Mobile: Can't position the component properly in titlecontent area of ActionBarFlex Mobile:无法在 ActionBar 的标题内容区域中正确定位组件
【发布时间】:2012-04-05 05:02:00
【问题描述】:

当我尝试在 ActionBar 的 titleContent 中放置一个按钮时,事情变得很奇怪。设置“left”和“horizo​​ntalCenter”都不能移动我的按钮。代码如下:

    <s:titleContent>
       <s:Button label="HELLO" left="50"/>
    </s:titleContent>

如何在此操作栏的中间放置一个按钮??

【问题讨论】:

    标签: apache-flex mobile flex-actionbar


    【解决方案1】:

    docs 表示 titleContent 的默认布局是 HorizontalLayout。所以 'left' 和 'horizo​​ntalCenter' 不适用。

    您可以使用 titleLayout 属性为标题内容使用不同的布局 (BasicLayout):

    <s:titleLayout>
        <s:BasicLayout />
    </s:titleLayout>
    

    【讨论】:

      【解决方案2】:

      你也可以使用 css :

      s|ActionBar 
      {
          titleAlign: center;
      }
      

      【讨论】:

        猜你喜欢
        • 2010-12-25
        • 1970-01-01
        • 1970-01-01
        • 2019-02-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多