Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2639] iOS: Toolbar backgroundImage property not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-06-21T18:32:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsios
ReporterSamuel East
AssigneeDaniel Sefton
Created2013-06-18T12:49:50.000+0000
Updated2016-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

FileDateSize
bar.png2013-06-21T11:32:55.000+00001034
bar.png2013-06-18T12:49:50.000+000011352

Comments

  1. Daniel Sefton 2013-06-18

    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.
  2. Samuel East 2013-06-20

    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
  3. Daniel Sefton 2013-06-20

    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)
  4. Samuel East 2013-06-21

    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();
  5. Samuel East 2013-06-21

    bar image
  6. Daniel Sefton 2013-06-21

    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.

JSON Source