Changing TabBar backgroundColor
Hello,
has anyone had the chance to solve this :
http://support.appcelerator.net/discussions/titanium-mobile-discussion/1606-possible-to-change-main-tabbars-color
it looks like there is a way to do it in objective C
http://silentmac.com/?p=386
thanks a lot
8 Answers
-
Found it… this comes in Ti SDK 3.1.0
messageBoardTab = Ti.UI.createTab({ title: '', window: messageBoard, icon: '/images/tabBtnCommunity_inactive.png', activeIcon: '/images/tabBtnCommunity_active.png', });
-
You cannot change the color of the TabBar, but there are tricks to changing the look and feel. For example on all of your windows, you can set
win.tabBarHidden = true;
and then create you own TabBar that controls the REAL TabBar like this:fakeTabGroup.addEventListener('click', function(e) { realTabGroup.setActiveTab(e.source.index); });
I created a module called Fancy Tabbed Bar that can be styled and used to control the TabBar, you can check it out here.
-
thanks, i tried it but this only changed the navbar and the toolbar (if i set one)
i'd like to change the tabbed bar as in here :
http://maverix.typepad.com/.a/6a00d83454dfb769e20120a7163c9d970b-250wiwhich is blue in the above example.
-
same question…
-
Ya how do you change it??
-
did you find a solution?
-
Here's what I use on top of my window js file, works but I'm not sure it's not slowering the app…
Ti.UI.currentWindow.barColor = '#b40000';
-
Use 'barImage' or 'barColor' property for Titanium.UI.Window.
e.g.)
win2 = Titanium.UI.createWindow({
title: "Tab 2",
backgroundColor: "#fff",
barImage: "button-bar.png"
});OR
win2.barImage = "button-bar.png";