[TIMOB-1670] iOS: Button image does not show title when button is in a toolbar
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-25T16:07:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | ctredway |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:58:57.000+0000 |
Updated | 2012-07-26T22:23:45.000+0000 |
Description
The following code does not show the title when a button in toolbar also has an image. iOS 4, sdk 1.4 & newer 1.4.1 build
var win = Titanium.UI.currentWindow;
// initialize to all modes win.orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
var flexSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
var change = Titanium.UI.createButton({
image:'button.png',
title:'Change Toolbar',
// style:Titanium.UI.iPhone.SystemButtonStyle.BORDERED,
width:100,
height:35
});
var revert = Titanium.UI.createButton({
title:'Revert Toolbar',
style:Titanium.UI.iPhone.SystemButtonStyle.DONE
});
// // Toolbar 2 // var toolbar2 =
Titanium.UI.createToolbar({
items:[change,flexSpace,revert],
top:130,
borderTop:false,
borderBottom:false,
barColor:'#336699'
});
change.addEventListener('click', function()
{
toolbar2.borderTop = false;
toolbar2.borderBottom = false;
toolbar2.translucent = true;
toolbar2.barColor = '#000';
toolbar2.width = 300;
change.width = "160";
change.title = "Change Toolbar (!)";
});
revert.addEventListener('click', function()
{
toolbar2.borderTop = true;
toolbar2.borderBottom = true;
toolbar2.barColor = '#336699';
toolbar2.width = null;
change.width = 0; // 0 means auto
change.title = "Change Toolbar";
});
win.add(toolbar2);
Attachments
File | Date | Size |
---|---|---|
button.png | 2011-04-15T02:58:57.000+0000 | 530 |
Cannot be reproduced from sample app in SDK 2.2.0.f9e938d, iPhone Sim 5.1.