-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-9386: Android: Implement conditional horizontal layout wrapping #2368
Changes from 7 commits
f1fbb3b
cedf4fb
b0153fc
2fd9765
ea30e03
7f69984
3f1c742
127f493
e07c01f
a8892bc
3240472
4d53be1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -952,12 +952,15 @@ properties: | |
|
||
Each child is positioned horizontally as in the composite layout mode. | ||
|
||
* `horizontal`. Somewhat like the vertical layout, except children are laid out horizontally | ||
* `horizontal`. Horizontal layouts have different behavior depending on whether | ||
the wrap property is enabled. Horizontal layouts with wrapping behavior are | ||
somewhat like vertical layouts, except the children are laid out horizontally | ||
from left to right, _in rows_. If a child requires more horizontal space than | ||
exists in the current row, it is wrapped to a new row. The height of each row | ||
is equal to the maximum height of the children in that row. | ||
is equal to the maximum height of the children in that row. The wrapping behavior | ||
is enabled by default. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
On iOS and Mobile Web (Release 2.1.0 and later), the first row is placed | ||
On iOS, Android and Mobile Web (Release 2.1.0 and later), the first row is placed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only when |
||
at the top of the parent view, and successive rows are placed below the first | ||
row. Each child is positioned vertically _within its row_ somewhat like | ||
composite layout mode. In particular: | ||
|
@@ -966,15 +969,15 @@ properties: | |
row. | ||
* If either `top` or `bottom` is specified, the child is aligned to either | ||
the top or bottom of the row, with the specified amount of padding. | ||
* If *both* `top` and `bottom` is specified for a given child, the behavior | ||
is undefined. | ||
* If *both* `top` and `bottom` is specified for a given child, the properties | ||
are both treated as padding. | ||
* The `center` property is ignored in this mode. | ||
|
||
On Android, the first row is centered vertically in the parent view, and | ||
successive rows are placed below the first row as on iOS. However, the `top` | ||
and `bottom` values are interpreted relative to the parent view. | ||
When the wrap property is disabled, the behavior is identical to a vertical layout, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. property can not be disabled. Should read when |
||
except children are laid out horizontally from left to right, _in rows_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be in rows when wrap is false. It's a single row. Something like this maybe?
|
||
|
||
On Mobile Web _prior to_ Release 2.1.0, the horizontal layout does not wrap. | ||
On Mobile Web _prior to_ Release 2.1.0, the horizontal layout does not wrap by default, | ||
and does not support the wrap property. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Also, I think we should add a paragraph: On Android and iOS prior to Release 2.1.0, the horizontal layout always wraps and the |
||
default: Composite layout | ||
|
||
- name: opacity | ||
|
@@ -1079,7 +1082,14 @@ properties: | |
the view's size once rendered, use the [rect](Titanium.UI.View.rect) or | ||
[size](Titanium.UI.View.size) properties. | ||
type: [Number,String] | ||
|
||
|
||
- name: wrap | ||
summary: Determines whether the layout has wrapping behavior. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a less ambiguous name like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Property still not renamed to horizontalWrap is docs |
||
description: This is only available when the layout mode is set to 'horizontal'. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also include a cross-reference--this doesn't explain anything about what it does.
|
||
type: Boolean | ||
default: true | ||
platforms: [android, iphone, ipad] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If mobileweb is going to support this, it should be included here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since: "2.1.0" |
||
|
||
- name: zIndex | ||
summary: Z-index stack order position, relative to other sibling views. | ||
description: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ti:app xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<id>org.appcelerator.titanium.testharness</id> | ||
<name>test_harness</name> | ||
<version>1.0</version> | ||
<publisher>not specified</publisher> | ||
<url>not specified</url> | ||
<description>not specified</description> | ||
<copyright>not specified</copyright> | ||
<icon>appicon.png</icon> | ||
<persistent-wifi>false</persistent-wifi> | ||
<prerendered-icon>false</prerendered-icon> | ||
<statusbar-style>default</statusbar-style> | ||
<statusbar-hidden>false</statusbar-hidden> | ||
<fullscreen>false</fullscreen> | ||
<navbar-hidden>false</navbar-hidden> | ||
<analytics>false</analytics> | ||
<guid>CF0D2CB7-B4BD-488F-9F8E-669E6B53E0C4</guid> | ||
<android> | ||
<screens small="false" normal="true" large="true" anyDensity="false" /> | ||
<manifest> | ||
<instrumentation | ||
android:targetPackage="org.appcelerator.titanium.testharness" | ||
android:name="org.appcelerator.titanium.drillbit.TestHarnessRunner"> | ||
<meta-data android:name="class" android:value="org.appcelerator.titanium.testharness.Test_harnessActivity"/> | ||
</instrumentation> | ||
</manifest> | ||
</android> | ||
<property name="ti.android.enablecoverage" type="bool">true</property> | ||
<property name="ti.android.include_all_modules" type="bool">true</property> | ||
<property name="ti.android.fastdev" type="bool">false</property> | ||
<property name="ti.android.runtime"><%= androidRuntime %></property> | ||
<property name="ti.android.threadstacksize" type="int">102400</property> | ||
|
||
<property name="ti.ios.enablecoverage" type="bool">true</property> | ||
<property name="ti.ios.enablemdfind" type="bool">false</property> | ||
</ti:app> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap
property is set to true.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add paragraph break after introducing the concept of "wrapping" and before describing the wrap = true case. Here's my suggestion: