[TIMOB-484] Add support for block (or whatever you want to call it) layout
|Fix Version/s||Release 1.1.0|
We need to support a simple top-down layout for our native containers (windows, views, etc.)
This involves two major changes:
1) containers must support a layout property. We will initially only support a block layout (i.e., items added to a container will be stacked based on their explicit height or calculated height (for height:'auto')
2) views (all views) must support margin, marginTop, marginLeft, marginBottom, marginRight and padding, paddingTop, paddingLeft, paddingBottom, and paddingRight
- Nolan Wright 2011-04-15
Reviewed your doc and talked it over with Jeff. The reality is that 90% of the cases only require vertical layout, so let's start simple.
On the parent view let's add the ability to support a layout property. For now, this property will support two values: absolute and vertical. Absolute is the default.
By default views will be added directly below the previously added view (i.e., no space between the views). Sub views can use their top, left, right and bottom properties to effectively specify relative positioning (acts like margin). So if the second sub view added specifies a top:10, we would place that view 10 pixels below the view above it.
- Blain Hamon 2011-04-15
Verifying behavior: MarginFoo is the same as foo in absolute layout? (IE, it's the space outside the view owning the property. Padding would be the space inside the view?
- hal 2011-04-15
Do I understand correctly that relative positioning is currently only available for windows, meaning that only their direct children flow vertically?
Is there any plan to facilitate multiple views being relatively positioned within a container view and, if so, do you have any idea how long until it is released?
This functionality, along with percentages used for width, height, left, right, top, bottom etc, will vastly simplify screen building for different sized target device. Note that percentages currently do not work - are you also aware of this?
Thank you very much