首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

约束格局constraint layout

2013-03-13 
约束布局constraint layout约束布局constraint layout要点:1)只有支持绝对定位的容器才可能支持约束布局,

约束布局constraint layout
约束布局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

热点排行