Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18443] Improve horizontal layout for labels

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
Componentsn/a
Labelshorizontal, label, layout
ReporterMark Mokryn
AssigneeShuo Liang
Created2015-01-24T20:28:23.000+0000
Updated2015-01-26T03:27:13.000+0000

Description

See an example in [this Q&A](http://developer.appcelerator.com/question/180412/label--label-or-imageview) Here is an example of something that seems very difficult to do with Titanium: This could be an example of a label that is using a specific font and is long, stretching over a single screen line. *We may want the same paragraph to contain a different typeface* And we may also have an *ICON* (ImageView)- all in a single paragraph on the screen. How do we create such a "paragraph" in Titanium? The underlying issue seems to be that when using a Label in a horizontal layout, what we *probably* want is that the following item in the layout should be horizontally layed out with the *last line* in the Label, and not with the entire Label (which is the Label width). Thus, Labels should receive different treatment in horizontal layouts, enabling developers to "concatenate" labels, or labels with images, etc. Thus the suggestion is: 1. In a horizontal layout, the "left" (or "right", in a right aligned label) of the item *after* the Label should be the offset relative to the last line of the label, and not relative to the label width (in a multi-line label) 2. The "top" property of the item after the label should be relative to the second-to-last line of the label, if this item starts horizontally aligned with the last line of the label. Perhaps to maintain backwards compatibility with existing code, we can add a new "inline" layout, which behaves identically to "horizontal" with the exception of handling the next item following a Label.

Comments

No comments

JSON Source