Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9058] iOS: Toolbar doesn't show the full label

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-29T10:54:32.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-11 API
ComponentsiOS
LabelsSupportTeam, api, module_toolbar, qe-testadded
ReporterNikhil Sharma
AssigneeVishal Duggal
Created2012-05-08T12:10:03.000+0000
Updated2012-07-09T14:06:52.000+0000

Description

Toolbar doesn't show the full label text. Ti.UI.SIZE does not expend the label in the toolbar, label keeps being ellipsized even if I set the width to Ti.UI.FILL.

Repo Steps

1. Run the below code in app.js 2. You will see the toolbar label ellipsized.
var win = Titanium.UI.createWindow({
	title : 'Bug Isolation',
	backgroundColor : 'white',
	barColor : '#0066CC',
	navBarHidden : false,
	tabBarHidden : true
});

var tabGroup = Ti.UI.createTabGroup();

var tab = Ti.UI.createTab({
	title :'',
	window : win
});



var companyBar = Ti.UI.createToolbar({
	items:items,
	top:'0dp',
	borderTop:true,
	borderBottom:true,
	barColor:'#D6D6D6',
	right : '-6dp'
});
win.add(companyBar);

var companyBarLabel = Ti.UI.createLabel({
	left : '10dp',
	text : 'Greenlight Towing Company',
	color : '#333333',
	font : {fontSize : '14dp', fontWeight : 'bold'},
	textAlign : 'left',
	width : Ti.UI.FILL
});

var companyBarButton = Ti.UI.createButtonBar({
	labels : [{title:'New'}],
	style : Ti.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor : '#848684',
	visible : true
});

companyBarButton.addEventListener('click', function(){
	alert('You Clicked Me!');
})

var flexSpace = Titanium.UI.createButton({
	systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});

var fixedSpace = Titanium.UI.createButton({
	systemButton:Titanium.UI.iPhone.SystemButton.FIXED_SPACE,
	width : '0dp'
});

var items = [fixedSpace, companyBarLabel, flexSpace, companyBarButton, fixedSpace];

companyBar.items = items;
tabGroup.addTab(tab);
tabGroup.open();

Comments

  1. Neha Chhabra 2012-06-06

    Tested with Titanium SDK: 2.1.0.v20120605190238 Tested with Titanium  Studio: 2.1.0.201206041625 Device and Version: iPhone 4s(5.1)

JSON Source