forked from pec1985/Titanium-Live-Preview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
executable file
·82 lines (72 loc) · 2 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
76
77
78
79
80
81
/**
* This is just a sample file for building tabs in case you need it.
* Real magic happens in init.js
*/
var initial_tabs = Ti.UI.createTabGroup();
// create initial window and add a button to navigate to your externally created window
var win1 = Ti.UI.createWindow({title:'Your App'});
var button = Ti.UI.createButton({left:20,right:20,height:80,title:'Open'});
win1.add(button);
// Form window & tab
var tab1 = Ti.UI.createTab({
icon: 'images/icons/[email protected]',
title: 'remote',
window: win1
});
var win2 = Ti.UI.createWindow({title:'Your App',url:'edit.js'});
var tab2 = Ti.UI.createTab({
icon: 'images/icons/[email protected]',
title: 'local',
window:win2
});
// Add the tabs to the window
initial_tabs.addTab(tab1);
initial_tabs.addTab(tab2);
initial_tabs.open();
//when button is clicked, new window opens with exteral contenet
//this way, it refreshes the content everytime
button.addEventListener('click',function(){
var window = Ti.UI.createWindow({
url: 'init.js',
title: 'Window'
});
tab1.open(window);
});
// create an instance of all of the elements so that there are no errors later.
var a;
a=Ti.UI.create2DMatrix;
a=Ti.UI.create3DMatrix;
a=Ti.UI.createActivityIndicator;
a=Ti.UI.createAlertDialog;
a=Ti.UI.createAnimation;
a=Ti.UI.createButton;
a=Ti.UI.createButtonBar;
a=Ti.UI.createCoverFlowView;
a=Ti.UI.createDashboardItem;
a=Ti.UI.createDashboardView;
a=Ti.UI.createEmailDialog;
a=Ti.UI.createImageView;
a=Ti.UI.createLabel;
a=Ti.UI.createOptionDialog;
a=Ti.UI.createPicker;
a=Ti.UI.createPickerColumn;
a=Ti.UI.createPickerRow;
a=Ti.UI.createProgressBar;
a=Ti.UI.createScrollView;
a=Ti.UI.createScrollableView;
a=Ti.UI.createSearchBar;
a=Ti.UI.createSlider;
a=Ti.UI.createSwitch;
a=Ti.UI.createTab;
a=Ti.UI.createTabGroup;
a=Ti.UI.createTabbedBar;
a=Ti.UI.createTableView;
a=Ti.UI.createTableViewRow;
a=Ti.UI.createTableViewSection;
a=Ti.UI.createTextArea;
a=Ti.UI.createTextField;
a=Ti.UI.createToolbar;
a=Ti.UI.createView;
a=Ti.UI.createWebView;
a=Ti.UI.createWindow;
a=null;