现在的位置: 首页 > 综合 > 正文

tabbar!

2019年06月11日 ⁄ 综合 ⁄ 共 1316字 ⁄ 字号 评论关闭
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  3.         layout="vertical"
  4.         verticalAlign="middle"
  5.         backgroundColor="white">
  6.     <mx:Script>
  7.         <![CDATA[
  8.             [Bindable]
  9.             [Embed(source="assets/bulletCheck.png")]
  10.             private var BulletCheck:Class;
  11.             [Bindable]
  12.             [Embed(source="assets/bulletWarning.png")]
  13.             private var BulletWarning:Class;
  14.             [Bindable]
  15.             [Embed(source="assets/bulletCritical.png")]
  16.             private var BulletCritical:Class;
  17.         ]]>
  18.     </mx:Script>
  19.     <mx:VBox id="box" width="400" verticalGap="0">
  20.         <mx:TabBar id="tabBar"
  21.                 direction="horizontal"
  22.                 dataProvider="{viewStack}"
  23.                 width="100%" />
  24.         <mx:ViewStack id="viewStack"
  25.                 width="100%"
  26.                 height="100"
  27.                 backgroundColor="white"
  28.                 borderSides="left bottom right"
  29.                 borderStyle="solid"
  30.                 borderThickness="1">
  31.             <mx:Canvas id="child1"
  32.                     label="Success"
  33.                     icon="{BulletCheck}">
  34.                 <mx:Label text="one" />
  35.             </mx:Canvas>
  36.             <mx:Canvas id="child2"
  37.                     label="Warning"
  38.                     icon="{BulletWarning}">
  39.                 <mx:Label text="two" />
  40.             </mx:Canvas>
  41.             <mx:Canvas id="child3"
  42.                     label="Error"
  43.                     icon="{BulletCritical}">
  44.                 <mx:Label text="three" />
  45.             </mx:Canvas>
  46.         </mx:ViewStack>
  47.     </mx:VBox>
  48. </mx:Application>

抱歉!评论已关闭.