EXML——水平布局(HorizontalLayout)

作者:追风剑情 发布于:2017-3-1 16:23 分类:Egret

示例一:

新建ButtonTopTabSkinSkin.exml

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <e:Skin class="ButtonTopTabSkinSkin" states="up,down,disabled" minHeight="50" minWidth="100" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
  3. <e:Image width="100%" height="100%" scale9Grid="1,3,8,8" alpha.disabled="0.5"
  4. source="btn_common_up_png"
  5. source.down="btn_common_down_png"/>
  6. <e:Label id="labelDisplay" top="8" bottom="8" left="8" right="8"
  7. size="20"
  8. textColor="0xFFFFFF" verticalAlign="middle" textAlign="center" text="选项卡"/>
  9. <e:Image id="iconDisplay" horizontalCenter="0" verticalCenter="0"/>
  10.  
  11. <w:Config id="15a8886de91" ></w:Config>
  12. </e:Skin>

新建NormalTabBarSkin.exml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <e:Skin class="NormalTabBarSkin" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" >
  3. <w:Config id="15a8874aa96" ></w:Config>
  4. <e:Group anchorOffsetX="0">
  5. <e:layout>
  6. <e:HorizontalLayout gap="10" verticalAlign="middle"/>
  7. </e:layout>
  8. <e:Button skinName="ButtonTopTabSkinSkin" label="等级"/>
  9. <e:Button skinName="ButtonTopTabSkinSkin" label="功勋"/>
  10. <e:Button skinName="ButtonTopTabSkinSkin" label="财富"/>
  11. <e:Button skinName="ButtonTopTabSkinSkin" label="消费"/>
  12. <e:Button skinName="ButtonTopTabSkinSkin" label="关卡"/>
  13. <e:Button skinName="ButtonTopTabSkinSkin" label="成就"/>
  14. </e:Group>
  15. </e:Skin>

预览效果

111111.png

标签: Egret

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号