<?xml version="1.0" encoding="utf-8"?> <!--- Spark ConstraintLayout 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" width="480" height="200"> <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:constraintColumns> <s:constraintRows> <s:ConstraintRow id="row1" height="100" /> <s:ConstraintRow id="row2" height="100" /> </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 width="50" height="50" left = "col1 : 10" top = "row1 : 10" /> <s:Button width="50" height="50" left = "col2 : 10" top = "row2 : 20" /> <s:Button width="50" height="50" right = "col3 : 10" bottom = "row2 : 10" /> </s:Group> </s:Application>