eui.ColumnAlign 使用範例
exml部分
<?xml version='1.0' encoding='utf-8'?>
<e:Skin class="skins.MySkin" width="640" height="1136" xmlns:e="http://ns.egret.com/eui">
<e:Rect fillColor="0x000000" width="100%" height="100%" />
<e:Group width="100%" height="100%">
<!-- columnAlign = justifyUsingGap 欄位間距平均分配於父容器-->
<e:Group width="100%">
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:layout>
<e:TileLayout columnAlign="justifyUsingGap" />
</e:layout>
</e:Group>
<!-- columnAlign = justifyUsingWidth 欄位平均分配於父容器-->
<e:Group width="100%">
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:layout>
<e:TileLayout columnAlign="justifyUsingWidth" />
</e:layout>
</e:Group>
<!-- columnAlign = left 欄位置左對齊於父容器-->
<e:Group width="100%">
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:Rect fillColor="0xFF0000" width="50" height="50" />
<e:Rect fillColor="0xFFCC00" width="50" height="50" />
<e:layout>
<e:TileLayout columnAlign="left" />
</e:layout>
</e:Group>
<e:layout>
<e:VerticalLayout />
</e:layout>
</e:Group>
</e:Skin>
沒有留言:
張貼留言