hi does anybody know if its possible to have 2 tabgroups in one 1 window.
so you got your default tab group at the bottom of your iPhone
and then one tab group in the middle of your screen. same idea like the app Untappd
2 Answers
No, you can only have one tabgroup. The Untappd app looks like they have a main tab group and then a custom tab bar that controls the inner views. You'll have to build out this functionality on your own.
Hello Napp,
You want like this ???
// this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); var tabGroup = Titanium.UI.createTabGroup({ left : 0, width : 155 }); var win1 = Titanium.UI.createWindow({ title:'TabGroup 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win1.add(label1); var win2 = Titanium.UI.createWindow({ title:'Tab 2', backgroundColor:'#fff' }); var tab2 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 2', window:win2 }); var label2 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 2', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win2.add(label2); tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.open(); var tabGroup2 = Titanium.UI.createTabGroup({ left : 160, width : 160 }); var win1 = Titanium.UI.createWindow({ title:'TabGroup 2', backgroundColor:'pink' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 3', window:win1 }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 3', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win1.add(label1); var win2 = Titanium.UI.createWindow({ title:'Tab 4', backgroundColor:'#fff' }); var tab2 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 4', window:win2 }); var label2 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 4', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win2.add(label2); tabGroup2.addTab(tab1); tabGroup2.addTab(tab2); tabGroup2.open();
Your Answer
Think you can help? Login to answer this question!