当前位置:首页 > 开发 > Web前端 > 前端 > 正文

约束布局constraint layout

发表于: 2013-03-01   作者:darrenzhu   来源:转载   浏览:
摘要: 约束布局constraint layout要点: 1)只有支持绝对定位的容器才可能支持约束布局,如mx的Application,Panel,Canvas,spark的HGroup,VGroup,Group等 2)增强型约束布局只在很小的容器支持:Constraint rows and columns are only supported by the MX containers, and
约束布局constraint layout要点:
1)只有支持绝对定位的容器才可能支持约束布局,如mx的Application,Panel,Canvas,spark的HGroup,VGroup,Group等

2)增强型约束布局只在很小的容器支持:Constraint rows and columns are only supported by the MX containers, and the Spark FormLayout class.


3) Precedence rules for constraint-based components
If you specify a single edge constraint (left, right, top, or bottom) without any other sizing or positioning parameter, the component size is the default size and its position is determined by the constraint value. If you specify a size parameter (width or height), the size is determined by that parameter.

If you specify a pair of constraints (left-right or top-bottom), the size and position of the component is determined by those constraint values. If you also specify a center constraint (horizontalCenter or verticalCenter), the size of the component is calculated from the edge constraints and its position is determined by the center constraint value.

Component size determined by a pair of constraint-based layout properties (left-right or top-bottom) overrides any explicit or percentage-based size specifications. For example, if you specify both left and right constraints, the calculated constraint-based width overrides the width set by a width or percentWidth property.

Edge constraints override baseline constraints.

参考文章:
Using constraints to control component layout
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7df9.html

约束布局constraint layout

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号