熱門文章

Ⓔeui.JustifyAlign 用法

Group 佈局對齊方式

MainUISkin.exml

<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="edwin.MainUISkin" xmlns:e="http://ns.egret.com/eui">
    <e:Rect fillColor="0x000000" width="100%" height="100%" />
    <e:Group width="100%">
        <e:Group width="100%">
            <e:Rect fillColor="0xFF0000" width="50" height="50" />
            <e:Rect fillColor="0x00FF00" width="50" height="50" />
            <e:Rect fillColor="0xFF0000" width="50" height="50" />
            <e:Rect fillColor="0x00FF00" width="50" height="50" />
            <e:layout>
                <!-- 子物件按寬度比例分配滿版佈局 -->
                <e:HorizontalLayout horizontalAlign="justify" />
            </e:layout>
        </e:Group>
        <e:Group width="100%">
            <e:Rect fillColor="0xFF0000" width="50" height="50" />
            <e:Rect fillColor="0x00FF00" width="100" height="100" />
            <e:Rect fillColor="0xFF0000" width="50" height="50" />
            <e:Rect fillColor="0x00FF00" width="100" height="100" />
            <e:layout>
                <!-- 預設對齊方式 -->
                <e:HorizontalLayout horizontalAlign="contentJustify" />
            </e:layout>
        </e:Group>
        <e:layout>
            <e:VerticalLayout />
        </e:layout>
    </e:Group>
</e:Skin>

沒有留言:

張貼留言