Guest User

Untitled

a guest
Oct 19th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  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. // create base UI tab and root window
  9. //
  10. var win1 = Titanium.UI.createWindow({
  11. title:'Brigitte',
  12. backgroundColor:'#fff'
  13. });
  14.  
  15. var tab1 = Titanium.UI.createTab({
  16. icon:'KS_nav_views.png',
  17. title:'Tab 1',
  18. window:win1
  19. });
  20.  
  21. var lblUserName = Titanium.UI.createLabel({
  22. color:'#999',
  23. text:'User Name:',
  24. font:{fontSize:10,fontFamily:'Helvetica Neue'},
  25. top:'0',
  26. left:'0'
  27. });
  28.  
  29. win1.add(lblUserName);
  30. //
  31. // var tbUserName = Titanium.UI.createTextField({
  32. // hintText:'UserName',
  33. // borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
  34. // });
  35. //
  36. // win1.add(tbUserName);
  37. //
  38. // var label1 = Titanium.UI.createLabel({
  39. // color:'#999',
  40. // text:'Password:',
  41. // font:{fontSize:20,fontFamily:'Helvetica Neue'},
  42. // textAlign:'center',
  43. // width:'auto'
  44. // });
  45. //
  46. // win1.add(label1);
  47. //
  48. // var tbPassword = Titanium.UI.createTextField({
  49. // hintText:'Password',
  50. // borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
  51. // });
  52. //
  53. // win1.add(tbPassword);
  54.  
  55. //if(Ti.Platform == 'iOs')
  56. //var picker = Titanium.UI.createPicker({height:'100', top:'0', let:'0' });
  57. //picker.type = Titanium.UI.PICKER_TYPE_DATE_AND_TIME;
  58.  
  59. //win1.add(picker);
  60.  
  61.  
  62.  
  63. //
  64. // create controls tab and root window
  65. //
  66. var win2 = Titanium.UI.createWindow({
  67. title:'Tab 2',
  68. backgroundColor:'#fff'
  69. });
  70. var tab2 = Titanium.UI.createTab({
  71. icon:'KS_nav_ui.png',
  72. title:'Tab 2',
  73. window:win2
  74. });
  75.  
  76.  
  77. //
  78. // create controls tab and root window
  79.  
  80. /**/
  81. var data = [
  82. {title:'Tab Groups', hasChild:true, test:'../examples/tab_groups.js'},
  83. {title:'Window Properties', hasChild:true, test:'../examples/window_properties.js'},
  84. {title:'Window Layout', hasChild:true, test:'../examples/window_layout.js'},
  85. {title:'Window (Standalone)', hasChild:true, test:'../examples/window_standalone.js'},
  86. {title:'Views', hasChild:true, test:'../examples/views.js'},
  87. {title:'Custom Events', hasChild:true, test:'../examples/custom_events.js'},
  88. {title:'Window Events', hasChild:true, test:'../examples/window_events.js'},
  89. {title:'Vertical Layout', hasChild:true, test:'../examples/vertical_layout.js'},
  90. {title:'Horizontal Layout', hasChild:true, test:'../examples/horizontal_layout.js'}
  91. ];
  92.  
  93. var tableview = Titanium.UI.createTableView({
  94. data:data
  95. });
  96.  
  97. var win3 = Titanium.UI.createWindow({
  98. title:'Tab 3',
  99. backgroundColor:'#fff'
  100. });
  101.  
  102. var tab3 = Titanium.UI.createTab({
  103. icon:'KS_nav_ui.png',
  104. title:'Tab 3',
  105. window:win3
  106. });
  107.  
  108.  
  109. win3.add(tableview);
  110.  
  111. //
  112. // add tabs
  113. //
  114. tabGroup.addTab(tab1);
  115. tabGroup.addTab(tab2);
  116. tabGroup.addTab(tab3);
  117.  
  118.  
  119. // open tab group
  120. tabGroup.open();
Add Comment
Please, Sign In to add comment