-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
76 lines (61 loc) · 1.06 KB
/
app.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
// create a window
var win1 = Titanium.UI.createWindow({
Title : "test"
});
win1.backgroundColor = '#fff';
var tabGroup = Ti.UI.createTabGroup();
var tab1 = Ti.UI.createTab({
icon : 'KS_nav_views.png',
title : 'Latest',
window : win1
});
tabGroup.addTab(tab1);
tabGroup.open();
var prefs = require("TiPrefs/tiprefs");
// open the view
prefs.init("foo");
prefs.addSwitch({
id : "SAVE_ON_QUIT",
caption : "Save on quit"
});
prefs.addSwitch({
id : "HIDE_ALERTS",
caption : "Hide Alerts"
});
prefs.addChoice({
id : "DAY_OF_WEEK",
caption : "Day of Week",
choices : [{
title : 'Every Monday',
value : 1
}, {
title : 'Every Tuesday',
value : 2
}, {
title : 'Every Wednesday',
value : 3
}, {
title : 'Every Thursday',
value : 4
}, {
title : 'Every Friday',
value : 5
}, {
title : 'Every Saturday',
value : 6
}, {
title : 'Every Sunday',
value : 7
}]
});
prefs.addTextInput({
id : "USERNAME",
caption : "username",
value : "myuser"
});
prefs.addTextInput({
id : "API_KEY",
caption : "API Key",
value : "1234"
});
prefs.open();