Advertisement
Guest User

Untitled

a guest
May 11th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // this sets the background color of the master UIView (when there are no windows/tab groups on it)
  2. Titanium.UI.setBackgroundColor('#000');
  3.  
  4. // create tab group
  5. var tabGroup = Titanium.UI.createTabGroup();
  6.  
  7.  
  8. //
  9. // create base UI tab and root window
  10. //
  11. var win1 = Titanium.UI.createWindow({  
  12.     url:'test.js'
  13. });
  14. var tab1 = Titanium.UI.createTab({  
  15.     icon:'KS_nav_views.png',
  16.     title:'Tab 1',
  17.     window:win1
  18. });
  19.  
  20. //
  21. // create controls tab and root window
  22. //
  23. var win2 = Titanium.UI.createWindow({  
  24.     title:'Tab 2',
  25.     backgroundColor:'#fff'
  26. });
  27. var tab2 = Titanium.UI.createTab({  
  28.     icon:'KS_nav_ui.png',
  29.     title:'Tab 2',
  30.     window:win2
  31. });
  32.  
  33. var label2 = Titanium.UI.createLabel({
  34.     color:'#999',
  35.     text:'I am Window 2',
  36.     font:{fontSize:20,fontFamily:'Helvetica Neue'},
  37.     textAlign:'center',
  38.     width:'auto'
  39. });
  40.  
  41. win2.add(label2);
  42.  
  43.  
  44.  
  45. //
  46. //  add tabs
  47. //
  48. tabGroup.addTab(tab1);  
  49. tabGroup.addTab(tab2);  
  50.  
  51.  
  52. // open tab group
  53. tabGroup.open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement