Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13216] Blackberry: Ti.UI.SIZE and doesn't work with Labels

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-05-26T17:45:33.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sn/a
ComponentsBlackBerry
Labelsn/a
ReporterTony Lukasavage
AssigneeRussell McMahon
Created2013-03-26T14:46:01.000+0000
Updated2014-06-19T12:43:59.000+0000

Description

problem

Ti.UI.SIZE used for the height and width of a Ti.UI.Label causes the label not to appear at all on Blackberry. The use of Ti.UI.SIZE is critical with this component and is commonly used as the default behavior for a Label is typically Ti.UI.FILL.

expected behavior

Using Ti.UI.SIZE for the height and width of a Ti.UI.Label should result in the Label being the exact height and width of the text within it, based on the Label's set or default font properties.

test case

var win = Ti.UI.createWindow({
	backgroundColor: '#eee'
});
var label = Ti.UI.createLabel({
	color: '#000',

	height: Ti.UI.SIZE, // comment this line and
	width: Ti.UI.SIZE,  // comment this line to show text 

	text: 'this is a test'
});
win.add(label);
win.open();

Comments

  1. Lokesh Choudhary 2013-05-28

    Verified the fix, the labels work as expected & display when Ti.UI.SIZE is used. Environment: Ti Studio : 3.1.1.201305150313 Ti BB SDK : 3.1.1.v20130524180421 Mac OSX : 10.8.2 win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88 Q10 Simulator : 10.1.0.1720 Q10 Dev alpha C device running 10.1.0.138

JSON Source