Labels
Labels are used to display text. Here is an example call to create a label.
var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:Ti.UI.FILL, });
The properties are explained in the following table:
Attribute |
Description |
---|---|
|
The color of the label text. This can be specified as a predefined color name ( |
|
The text to display. |
|
The font properties. Note that the font properties are specified in JSON format. Even if you are only defining the Properties that can be specified are:
|
|
The justification of the text within the defined size of the label. |
|