[AC-2639] iOS: Toolbar backgroundImage property not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-06-21T18:32:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios |
Reporter | Samuel East |
Assignee | Daniel Sefton |
Created | 2013-06-18T12:49:50.000+0000 |
Updated | 2016-03-08T07:41:44.000+0000 |
Description
*Test case*
var tabGroup = Ti.UI.createTabGroup();
var self = Titanium.UI.createWindow({
backgroundColor : '#fbf4f2',
backgroundRepeat : true,
title : 'WINDOW WITH PLAIN IMAGE BG',
barColor : '#4899dd',
barImage : 'bar.png',
navBarHidden : false,
top : 0
});
flexSpace = Titanium.UI.createButton({
systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
title = Titanium.UI.createButton({
title : 'CANNOT SET A PLAIN BG IMAGE ON THIS!',
font : {
font : 'Open Sans',
fontSize : 12,
fontWeight : 'normal'
},
style : Titanium.UI.iPhone.SystemButtonStyle.PLAIN,
});
toolbar = Titanium.UI.iOS.createToolbar({
items : [flexSpace, title, flexSpace],
borderTop : true,
borderBottom : false,
backgroundImage : 'bar.png',
barImage : 'bar.png',
barColor : 'transparent',
translucent : true
});
self.add(toolbar);
var tab = Ti.UI.createTab({
title : "Doesn't matter",
window : self
});
tabGroup.addTab(tab);
tabGroup.open();
Attachments
File | Date | Size |
---|---|---|
bar.png | 2013-06-21T11:32:55.000+0000 | 1034 |
bar.png | 2013-06-18T12:49:50.000+0000 | 11352 |
Hi Samuel, Please can you add a bit more detail? I don't understand exactly what you mean, and I can't really tell from the screenshot. Also, please could you expand your test case to be runnable, and attach the bar.png that you're using.
Hi Daniel You cant set a plain background image on a toolbar. In the image its a split view on the left is a window and on the right is a toolbar i want a toolbar with no gradient just a plain color. Here give more info... http://developer.appcelerator.com/question/153677/plan-flat-background-image-on-toolbar#comment-177829 Thanks
Thanks, but we need a runnable test case (something that can be dropped into a Classic Default Project), and attaching the bar.png that you're trying to use would help as well (JIRA -> Edit -> Attachment)
Runnable case just drop in app.js var tabGroup = Ti.UI.createTabGroup(); var self = Titanium.UI.createWindow({ backgroundColor : '#fbf4f2', backgroundRepeat : true, title : 'WINDOW WITH PLAIN IMAGE BG', barColor : '#4899dd', barImage : 'bar.png', navBarHidden : false, top : 0 }); flexSpace = Titanium.UI.createButton({ systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE }); title = Titanium.UI.createButton({ title : 'CANNOT SET A PLAIN BG IMAGE ON THIS!', font : { font : 'Open Sans', fontSize : 12, fontWeight : 'normal' }, style : Titanium.UI.iPhone.SystemButtonStyle.PLAIN, }); toolbar = Titanium.UI.iOS.createToolbar({ items : [flexSpace, title, flexSpace], borderTop : true, borderBottom : false, backgroundImage : 'bar.png', barImage : 'bar.png', barColor : 'transparent', translucent : true }); self.add(toolbar); var tab = Ti.UI.createTab({ title : "Doesn't matter", window : self }); tabGroup.addTab(tab); tabGroup.open();
bar image
Many thanks for the test case, I can reproduce. I just found a duplicate report at TIMOB-9268. I've updated the version in that ticket and bumped it, so please watch that one instead. Closing this one.