-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid_ctrl.html
184 lines (160 loc) · 7.62 KB
/
android_ctrl.html
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE html>
<html lang="en" ng-app="myModule">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="My Website.">
<meta name="author" content="Chris Parsons">
<link rel="icon" href="/src/imgs/mankey.ico">
<title>Chris Parsons WebSite</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="/src/css/cover.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"><\/script>')</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.js"></script>
<link rel="stylesheet" href="//getbootstrap.com/examples/jumbotron/jumbotron.css">
<script src="/src/js/menuControl.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function() {
$( ".accordion" ).accordion({
collapsible: true,
heightStyle: "content",
active: false
});
});
</script>
<script src="/src/syntax/prism.js"></script>
<link rel="stylesheet" href="/src/syntax/prism.css">
<link rel="stylesheet" href="/src/css/mycss.css">
</head>
<body>
<div>
<div ng-include="'navBar.html'"></div>
</div>
<div class="jumbotron jumbotron-billboard">
<div class="img android"></div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="my-header2">Android</h1>
<p>The SDLC from creating code, through compiling it and finally (potentially) testing it.</p>
<p>Version 1.2: <a class="fa-stack fa-lg download" href="//chrisp1985.ddns.net:8082/__app/androidApp_v1_2.apk">
<i class="fa fa-square-o fa-stack-2x"></i>
<i class="fa fa-cloud-download fa-stack-1x fa-fw margin-bottom"></i>
</a></p>
</div>
</div>
</div>
</div>
<div class="container" align="left">
<div class="row">
<div class="col-md-9">
<br />
<div>
<section class="tab container" ng-controller="androidCtrl as tab">
<ul class="nav nav-pills">
<li ng-class="{ active: tab.isSet(1) }">
<a href ng-click="tab.setTab(1)">Background</a></li>
<li ng-class="{ active: tab.isSet(2) }">
<a href ng-click="tab.setTab(2)">Setup</a></li>
<li ng-class="{ active: tab.isSet(3) }">
<a href ng-click="tab.setTab(3)">Development</a></li>
<li ng-class="{ active: tab.isSet(4) }">
<a href ng-click="tab.setTab(4)">Test</a></li>
</ul>
<h4><br/></h4>
<div ng-show="tab.isSet(1)">
<blockquote>{{tab.selects[0].description}}
</blockquote>
<p><br/></p>
<h2>{{tab.selects[0].name}}</h2>
<p>{{tab.selects[0].background1}}</p>
<br \>
<p>{{tab.selects[0].background2}}</p>
</div>
<div ng-show="tab.isSet(2)">
<blockquote>{{tab.selects[1].description}}
</blockquote>
<p><br/></p>
<h2>{{tab.selects[1].name}}</h2>
<p>{{tab.selects[1].background1}}</p>
<br \>
<p>{{tab.selects[1].background2}}</p>
</div>
<div ng-show="tab.isSet(3)">
<blockquote>{{tab.selects[2].description}}
</blockquote>
<p><br/></p>
<h2>{{tab.selects[2].name}}</h2>
<p>{{tab.selects[2].background1}}</p>
</div>
<div ng-show="tab.isSet(4)">
<blockquote>{{tab.selects[3].description}}
</blockquote>
<p><br/></p>
<h2>{{tab.selects[3].name}}</h2>
<p>{{tab.selects[3].background1}}</p>
<br \>
<p>{{tab.selects[3].background2}}</p>
<br \>
<p>{{tab.selects[3].background3}}</p>
<br \>
<div class="accordion">
<div>Get Items in ScrollView Method</div>
<pre><code class="language-java">
public List<String> getTabNamesInScrollView(ExamplesPages objsPage) {
// Set prevLastVisible to a blank string, and setup the foundItems list.
String prevLastVisible = "";
List<String> foundItems = new ArrayList<>();
// Get the lastVisible tab, and check it doesn't match the previous last visible tab.
List<WebElement> lastVisible = objsPage.tabItems();
while (!lastVisible.get(lastVisible.size() - 1).getText().equals(prevLastVisible)) {
// Set prevLastVisible to the current lastVisible for the next loop.
prevLastVisible = lastVisible.get(lastVisible.size() - 1).getText();
// Add the visible tabs to the list that have not already been added.
for (WebElement foundEle : objsPage.tabItems()) {
if (!foundItems.contains(foundEle.getText())) {
foundItems.add(foundEle.getText());
}
}
// Find the bounds of the tabhost, then drag from 70% of the way along, back to 30%.
int lastVisX = (int) (objsPage.genericItemsMenu().getLocation().getX() + (objsPage.genericItemsMenu().getSize().width * 0.7));
int y_coord = (int) (objsPage.genericItemsMenu().getLocation().getY() + (objsPage.genericItemsMenu().getSize().height * 0.5));
int firstVisX = (int) (objsPage.genericItemsMenu().getLocation().getX() + (objsPage.genericItemsMenu().getSize().width * 0.3));
// Drag the list, to see what tabs are available.
driver.swipe(lastVisX, y_coord, firstVisX, y_coord, 500);
lastVisible = objsPage.tabItems();
lastVisible.get(lastVisible.size() - 1).getText();
}
return foundItems;
}
</code></pre>
</div>
<p><br/></p>
<p>{{tab.selects[3].background4}}</p>
</div>
</section>
</div>
</div>
</div>
</div>
<br />
</div>
<footer>
<hr>
<br />
<div>
<div ng-include="'footer.html'"></div>
</div>
</footer>
</body>
</html>