-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
62 lines (52 loc) · 1.36 KB
/
app.js
File metadata and controls
62 lines (52 loc) · 1.36 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 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({id:'tabGroup1'});
var topBarBackgroundImage = "images/topBar@2x.png";
//
// create "Search rooms" tab
//
var searchRooms = Titanium.UI.createWindow({
url: 'main_views/searchRooms.js',
titleid: 'searchRooms_title',
barImage: topBarBackgroundImage
});
var tab_searchRooms = Titanium.UI.createTab({
icon: 'images/tabs/tabbarIcon_searchRooms.png',
titleid: 'searchRooms_title',
window:searchRooms
});
//
// create "Add room" tab
//
var addRoom = Titanium.UI.createWindow({
url:'main_views/addRoom.js',
titleid:'addRoom_title',
barImage: topBarBackgroundImage
});
var tab_addRoom = Titanium.UI.createTab({
icon:'images/tabs/tabbarIcon_addRoom.png',
titleid:'addRoom_title',
window:addRoom
});
//
// create "See profile" tab
//
var profile = Titanium.UI.createWindow({
url:'main_views/profile.js',
titleid:'profile_title',
barImage: topBarBackgroundImage
});
var tab_profile = Titanium.UI.createTab({
icon:'images/tabs/tabbarIcon_profile.png',
titleid:'profile_title',
window:profile
});
//
// add tabs
//
tabGroup.addTab(tab_searchRooms);
tabGroup.addTab(tab_addRoom);
tabGroup.addTab(tab_profile);
// open tab group
tabGroup.open();