[TIMOB-484] Add support for block (or whatever you want to call it) layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.1.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:30:04.000+0000 |
Updated | 2011-04-17T01:53:14.000+0000 |
Description
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
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.
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?
Nolan
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
Hal