Titanium中布局类Titanium.UI.Window.layout

Titanium.UI.Window.layout

Property of Titanium.UI.Window. Inherited from Titanium.UI.View.
PlatformSince
Android0.9
iPhone0.9
iPad0.9
Mobile Web1.8
Permission: read-write

Summary

Specifies how the view positions its children. One of: 'absolute', 'vertical', or 'horizontal'.

Type

String

Default

absolute layout

Description

There are three layout options:

  • absolute. Default layout. A child view's top, bottom, left, and right properties are interpreted as absolute values in the parent's coordinate space.

    If the child includes a top value and not a bottom value, the child is positioned top units from the top of the parent's bounding box, and its height is set based on its height property.

    If the child includes a bottom value and not a top value, the child is positioned bottom units from the bottom of the parent's bounding box. Its height is set based on its height property.

    If the child includes both top and bottom values, the behavior is platform-specific.

    Similar calculations are used for left and right.

    You can also position a child by setting its center property to a Point.

    If no position is set explicitly, children are centered. For example, if a child specifies a top of 20 and does not specify any other position properties, the child is positioned 20 units from the parent's top, and centered horizontally.

  • vertical. Children are laid out vertically from top to bottom. The first child is laid out top units from its parent's bounding box. Each subsequent child is laid out below the previous child. The space between children is equal to the upper child's bottom value plus the lower child's top value.

    Each child is positioned horizontally as for the absolute layout mode.

  • horizontal. Like vertical layout, except children are laid out horizontally from left to right, using the left and right values to determine spacing.

    Each child is positioned vertically as in the absolute layout mode.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值