aboutsummaryrefslogtreecommitdiffstats
path: root/Resources/friendship/ui/ApplicationWindow.js
blob: 06f46328ae8e12f4caeb4bc74867d42bc36ab866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function() {
	fs.ui.createApplicationTabGroup = function() {
		var tab_group = Ti.UI.createTabGroup();
		Ti.UI.currentTabGroup = tab_group;
		
		var refresh_button = Ti.UI.createButton({
			image: 'images/refresh.png',
			height: 5
		});
		refresh_button.addEventListener('click', fs.ui.refreshLikeList);
		
		var win = Ti.UI.createWindow({
			title: 'Sphnx',
    		tabBarHidden: true,
    		leftNavButton: refresh_button
		});
		var loading = fs.ui.createLoadingView();
		win.add(loading);
		
		var tab = Titanium.UI.createTab({  
    		icon:'KS_nav_views.png',
    		title:'Likes',
    		window: win
		});
		
		win.add(fs.ui.createLikeList());
		fs.ui.refreshLikeList();
		tab_group.addTab(tab);
		
		return tab_group;
	};
})();