eui.TileLayout 範例, 你也可以形容它是 grid layout.
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%" />
<!-- TileLayout -->
<e:Group>
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:Rect fillColor="0x0000FF" width="100" height="100" />
<e:Rect fillColor="0xFF0000" width="100" height="100" />
<e:Rect fillColor="0x00FF00" width="100" height="100" />
<e:layout>
<!-- requestedColumnCount=5 表示水平只能放5個 -->
<e:TileLayout horizontalGap="0" verticalGap="0" requestedColumnCount="5" />
</e:layout>
</e:Group>
</e:Skin>
沒有留言:
張貼留言