简体   繁体   English

从下至上TileLayout

[英]bottom to top TileLayout

I need a TileLayout rendering elements bottom to top and right to left. 我需要一个TileLayout渲染元素,从下到上,从右到左。 Something like this: 像这样: 例

I managed to trick the TileLayout for the "right to left" part, by setting the 'layoutDirection' attribute of my container to "rtl", but there is no equivalence for the vertical rendering. 通过将容器的“ layoutDirection”属性设置为“ rtl”,我设法欺骗了TileLayout的“从右到左”部分,但是垂直渲染没有等效项。

<s:Group layoutDirection="rtl">
    <s:layout>
        <s:TileLayout columnWidth="250" horizontalGap="8"/>
    </s:layout>

    <!-- etc -->    
    <s:Group id="fakeGroup3" layoutDirection="ltr"/>
    <s:Group id="fakeGroup2" layoutDirection="ltr"/>
    <s:Group id="fakeGroup1" layoutDirection="ltr"/>

</s:Group>

Is there a simple way to achieve this? 有没有简单的方法可以做到这一点? Or should I override TileLayout?!? 还是应该覆盖TileLayout?!?

You can anchor your Tile layout group to the bottom of the page: 您可以将Tile布局组锚定到页面底部:

<s:Group width="100%" height="100%" id="outermostLayoutContainer">
    <s:Group layoutDirection="rtl" width="100%" bottom="0">
        <s:layout>
            <s:TileLayout columnWidth="250" horizontalGap="8"/>
        </s:layout>

        <!-- etc -->    
        <s:Group id="fakeGroup3" layoutDirection="ltr"/>
        <s:Group id="fakeGroup2" layoutDirection="ltr"/>
        <s:Group id="fakeGroup1" layoutDirection="ltr"/>

    </s:Group>
</s:Group>

The inner Group with bottom="0" will push up towards the top of the screen based on its children. bottom="0"的内部组将根据其子级向上推向屏幕顶部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM