Created
March 15, 2011 17:21
Revisions
-
jonalter created this gist
Mar 15, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Titanium.UI.setBackgroundColor('#000'); var BHunter = {}; Ti.include('ui.js'); BHunter.tabGroup = BHunter.ui.createAppTabGroup(); BHunter.tabGroup.open(); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ (function() { BHunter.ui = {}; BHunter.ui.createTableWindow = function(_e) { var win = Ti.UI.createWindow({ title: _e.title }); var data = [ {title: 'test 1'}, {title: 'test 2'}, {title: 'test 3'}, {title: 'test 4'}, {title: 'test 5'} ]; var tableView = Ti.UI.createTableView({ data: data }); win.add(tableView); return win; }; BHunter.ui.createAppTabGroup = function() { var tabGroup = Titanium.UI.createTabGroup(); var tab1 = Titanium.UI.createTab({ title: 'Fugitives', window: BHunter.ui.createTableWindow({title: 'Fugitives'}) }); var tab2 = Titanium.UI.createTab({ title: 'Captured', window: Titanium.UI.createWindow({ title: 'Captured', backgroundColor:'#fff' }) }); tabGroup.addTab(tab1); tabGroup.addTab(tab2); return tabGroup; }; })();