How can unselect tab.
Hello,
I am using two tabbed bars tb1 and tb2 I want to
unselected tb1 when tb2 is selected. how it is possible.
// title control
var tb1 = Titanium.UI.createTabbedBar({
index:0,
labels:['Home','Log in','Upload video'],
backgroundColor:'#333333',
style:Titanium.UI.iPhone.SystemButtonStyle.BAR
});
win1.setTitleControl(tb1);
var tb2 = Titanium.UI.createTabbedBar({
labels:['Search','Most viewed','Most recent'],
backgroundColor:'#333333',
style:Titanium.UI.iPhone.SystemButtonStyle.BAR
});
var flexSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
win1.setToolbar([flexSpace,tb2,flexSpace]);
2 Answers
-
Hi vikas,
I could be wrong but I think a tabbed bar always has one button selected. You could try using a 'toolbar' but would probably have to manage the states in your code.
cheers,
Chris. -
Set the index of TabbedBar to -1 to deselect