[TIMOB-24820] TiAPI: Flexible width in horizontal layouts not behaving correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 6.1.0 |
Fix Version/s | n/a |
Components | Android, iOS, Windows |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Unknown |
Created | 2017-06-14T18:04:19.000+0000 |
Updated | 2018-02-28T19:55:41.000+0000 |
Description
During the #titaniumDE meetup in Berlin, we had an interesting discussion around flexible box-layouts. Basically, when you have a horizontal layout, you can have the first view using a static width (like
width: 100
), then another view with no width specified (should Ti.UI.FILL
) and then another view width a static width.
Here is some Alloy demo-code:
<Alloy>
<Window>
<View layout="vertical">
<View layout="horizontal" height="100">
<View width="100" backgroundColor="#ff0000"></View>
<!-- Should expand but respect the view to the right with the given width -->
<View backgroundColor="#ffff00"></View>
<View width="100" backgroundColor="#cecece"></View>
</View>
<View layout="horizontal" height="100">
<View width="20" backgroundColor="#ff0000"></View>
<View width="100%" backgroundColor="#cecece"></View>
<View width="40" backgroundColor="#ffff00"></View>
</View>
</View>
</Window>
</Alloy>
There is also a screenshot attached. Thanks to [~mBahl] for raising this issue! This is open for discussion.
Attachments
File | Date | Size |
---|---|---|
pasted_image_at_2017_06_14_12_53_pm_720.png | 2017-06-14T18:04:57.000+0000 | 13059 |
No comments