<?xml version="1.0" encoding="utf-8"?> <!--- Spark Constraint Layout Sample (constraintColumns & constraintRows) --> <s:Application xmlns:fx = "http://ns.adobe.com/mxml/2009" xmlns:s = "library://ns.adobe.com/flex/spark" viewSourceURL="srcview/index.html"> <s:Group verticalCenter="0" horizontalCenter="0" maxWidth="640" maxHeight="480"> <s:layout> <s:ConstraintLayout> <s:constraintColumns> <s:ConstraintColumn id="col1" width="160" /> <s:ConstraintColumn id="col2" width="160" /> <s:ConstraintColumn id="col3" width="160" /> <s:ConstraintColumn id="col4" width="160" /> </s:constraintColumns> <s:constraintRows> <s:ConstraintRow id="row1" height="120" /> <s:ConstraintRow id="row2" height="120" /> <s:ConstraintRow id="row3" height="120" /> <s:ConstraintRow id="row4" height="120" /> </s:constraintRows> </s:ConstraintLayout> </s:layout> <s:Rect left="0" top="0" right="0" bottom="0"> <s:fill> <s:SolidColor color="#990099" /> </s:fill> </s:Rect> <s:Button left = "col1 : 0" right="col1 : 0" top = "row1 : 0" bottom="row2 : 0" /> <s:Button left = "col2 : 0" right="col3 : 0" top = "row1 : 0" bottom="row1 : 0" /> <s:Button left = "col4 : 0" right="col4 : 0" top = "row1 : 0" bottom="row3 : 0" /> <s:Button left = "col2 : 0" right="col3 : 0" top = "row2 : 0" bottom="row3 : 0" /> <s:Button left = "col1 : 0" right="col1 : 0" top = "row3 : 0" bottom="row4 : 0" /> <s:Button left = "col2 : 0" right="col2 : 0" top = "row4 : 0" bottom="row4 : 0" /> <s:Button left = "col3 : 0" right="col4 : 0" top = "row4 : 0" bottom="row4 : 0" /> </s:Group> </s:Application>