Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this sets the background color of the master UIView (when there are no windows/tab groups on it)
- Titanium.UI.setBackgroundColor('#000');
- // create tab group
- var tabGroup = Titanium.UI.createTabGroup();
- //
- // create base UI tab and root window
- //
- var win1 = Titanium.UI.createWindow({
- title:'Brigitte',
- backgroundColor:'#fff'
- });
- var tab1 = Titanium.UI.createTab({
- icon:'KS_nav_views.png',
- title:'Tab 1',
- window:win1
- });
- var lblUserName = Titanium.UI.createLabel({
- color:'#999',
- text:'User Name:',
- font:{fontSize:10,fontFamily:'Helvetica Neue'},
- top:'0',
- left:'0'
- });
- win1.add(lblUserName);
- //
- // var tbUserName = Titanium.UI.createTextField({
- // hintText:'UserName',
- // borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
- // });
- //
- // win1.add(tbUserName);
- //
- // var label1 = Titanium.UI.createLabel({
- // color:'#999',
- // text:'Password:',
- // font:{fontSize:20,fontFamily:'Helvetica Neue'},
- // textAlign:'center',
- // width:'auto'
- // });
- //
- // win1.add(label1);
- //
- // var tbPassword = Titanium.UI.createTextField({
- // hintText:'Password',
- // borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
- // });
- //
- // win1.add(tbPassword);
- //if(Ti.Platform == 'iOs')
- //var picker = Titanium.UI.createPicker({height:'100', top:'0', let:'0' });
- //picker.type = Titanium.UI.PICKER_TYPE_DATE_AND_TIME;
- //win1.add(picker);
- //
- // create controls tab and root window
- //
- 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
- });
- //
- // create controls tab and root window
- /**/
- var data = [
- {title:'Tab Groups', hasChild:true, test:'../examples/tab_groups.js'},
- {title:'Window Properties', hasChild:true, test:'../examples/window_properties.js'},
- {title:'Window Layout', hasChild:true, test:'../examples/window_layout.js'},
- {title:'Window (Standalone)', hasChild:true, test:'../examples/window_standalone.js'},
- {title:'Views', hasChild:true, test:'../examples/views.js'},
- {title:'Custom Events', hasChild:true, test:'../examples/custom_events.js'},
- {title:'Window Events', hasChild:true, test:'../examples/window_events.js'},
- {title:'Vertical Layout', hasChild:true, test:'../examples/vertical_layout.js'},
- {title:'Horizontal Layout', hasChild:true, test:'../examples/horizontal_layout.js'}
- ];
- var tableview = Titanium.UI.createTableView({
- data:data
- });
- var win3 = Titanium.UI.createWindow({
- title:'Tab 3',
- backgroundColor:'#fff'
- });
- var tab3 = Titanium.UI.createTab({
- icon:'KS_nav_ui.png',
- title:'Tab 3',
- window:win3
- });
- win3.add(tableview);
- //
- // add tabs
- //
- tabGroup.addTab(tab1);
- tabGroup.addTab(tab2);
- tabGroup.addTab(tab3);
- // open tab group
- tabGroup.open();
Add Comment
Please, Sign In to add comment