[TIMOB-9058] iOS: Toolbar doesn't show the full label
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-05-29T10:54:32.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-11 API |
Components | iOS |
Labels | SupportTeam, api, module_toolbar, qe-testadded |
Reporter | Nikhil Sharma |
Assignee | Vishal Duggal |
Created | 2012-05-08T12:10:03.000+0000 |
Updated | 2012-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();
Tested with Titanium SDK: 2.1.0.v20120605190238 Tested with Titanium Studio: 2.1.0.201206041625 Device and Version: iPhone 4s(5.1)