added wifi scanner to wifi settings page
[DHBWCampusApp.git] / app / src / main / res / layout / fragment_wifi_settings.xml
1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2     xmlns:tools="http://schemas.android.com/tools"
3     xmlns:app="http://schemas.android.com/apk/res-auto"
4     android:layout_width="match_parent"
5     android:layout_height="match_parent"
6     android:orientation="vertical"
7     tools:context="de.dhbwloe.campusapp.fragments.WifiSettings"
8     android:padding="8dp">
9
10     <!-- TODO: Update blank fragment layout -->
11     <TextView
12         android:layout_width="match_parent"
13         android:layout_height="wrap_content"
14         android:text="@string/wifisettings_about_wifi" />
15
16     <RelativeLayout
17         android:layout_width="match_parent"
18         android:layout_height="wrap_content"
19         android:layout_marginTop="8dp">
20
21         <TextView
22             android:layout_width="wrap_content"
23             android:layout_height="wrap_content"
24             android:text="@string/wifisettings_current_status"
25             android:id="@+id/textView14" />
26
27         <TextView
28             android:layout_width="wrap_content"
29             android:layout_height="wrap_content"
30             android:text="{status}"
31             android:id="@+id/wifiStatusText"
32             android:layout_alignParentTop="true"
33             android:layout_toRightOf="@+id/textView14"
34             android:layout_toEndOf="@+id/textView14"
35             android:layout_marginLeft="8dp" />
36     </RelativeLayout>
37
38     <android.support.design.widget.AppBarLayout
39         android:layout_width="match_parent"
40         android:layout_height="wrap_content"
41         android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
42         android:layout_marginTop="8dp">
43
44         <android.support.design.widget.TabLayout
45             android:id="@+id/tabs"
46             android:layout_width="match_parent"
47             android:layout_height="wrap_content"
48             app:tabMode="scrollable"
49             />
50     </android.support.design.widget.AppBarLayout>
51
52     <TableLayout
53         android:layout_width="match_parent"
54         android:layout_height="wrap_content">
55
56         <TableRow
57             android:layout_width="match_parent"
58             android:layout_height="match_parent">
59
60             <TextView
61                 android:layout_width="wrap_content"
62                 android:layout_height="wrap_content"
63                 android:text="@string/wifisettings_ssid_caption"
64                 android:id="@+id/textView3"
65                 android:layout_weight="1" />
66
67             <TextView
68                 android:layout_width="wrap_content"
69                 android:layout_height="wrap_content"
70                 android:text="{ssid}"
71                 android:id="@+id/ssidInfo"
72                 android:paddingLeft="8dp"
73                 android:layout_alignParentTop="true"
74                 android:layout_centerHorizontal="true"
75                 android:layout_weight="1" />
76
77         </TableRow>
78
79         <TableRow
80             android:layout_width="match_parent"
81             android:layout_height="match_parent">
82
83             <TextView
84                 android:layout_width="wrap_content"
85                 android:layout_height="wrap_content"
86                 android:text="@string/wifisettings_security_caption"
87                 android:id="@+id/textView4"
88                 android:layout_weight="1" />
89
90             <TextView
91                 android:layout_width="wrap_content"
92                 android:layout_height="wrap_content"
93                 android:text="{security}"
94                 android:id="@+id/securityInfo"
95                 android:paddingLeft="8dp"
96                 android:layout_weight="1" />
97         </TableRow>
98
99         <TableRow
100             android:layout_width="match_parent"
101             android:layout_height="match_parent"
102             android:id="@+id/eapInfoRow">
103
104             <TextView
105                 android:layout_width="wrap_content"
106                 android:layout_height="wrap_content"
107                 android:text="@string/wifisettings_eap_caption"
108                 android:id="@+id/textView6"
109                 android:layout_weight="1" />
110
111             <TextView
112                 android:layout_width="wrap_content"
113                 android:layout_height="wrap_content"
114                 android:text="{eap}"
115                 android:id="@+id/eapInfo"
116                 android:paddingLeft="8dp"
117                 android:layout_weight="1" />
118         </TableRow>
119
120         <TableRow
121             android:layout_width="match_parent"
122             android:layout_height="match_parent"
123             android:id="@+id/phase2InfoRow">
124
125             <TextView
126                 android:layout_width="wrap_content"
127                 android:layout_height="wrap_content"
128                 android:text="@string/wifisettings_phase2_caption"
129                 android:id="@+id/textView7"
130                 android:layout_weight="1" />
131
132             <TextView
133                 android:layout_width="wrap_content"
134                 android:layout_height="wrap_content"
135                 android:text="{phase2}"
136                 android:id="@+id/phase2Info"
137                 android:paddingLeft="8dp"
138                 android:layout_weight="1" />
139         </TableRow>
140
141         <TableRow
142             android:layout_width="match_parent"
143             android:layout_height="match_parent"
144             android:id="@+id/cacertInfoRow">
145
146             <TextView
147                 android:layout_width="wrap_content"
148                 android:layout_height="wrap_content"
149                 android:text="@string/wifisettings_cacert_caption"
150                 android:id="@+id/textView8"
151                 android:layout_weight="1" />
152
153             <TextView
154                 android:layout_width="wrap_content"
155                 android:layout_height="wrap_content"
156                 android:text="{cacert}"
157                 android:id="@+id/cacertInfo"
158                 android:paddingLeft="8dp"
159                 android:layout_weight="1" />
160         </TableRow>
161
162         <TableRow
163             android:layout_width="match_parent"
164             android:layout_height="match_parent"
165             android:id="@+id/pskInfoRow">
166
167             <TextView
168                 android:layout_width="wrap_content"
169                 android:layout_height="wrap_content"
170                 android:text="@string/wifisettings_psk_caption"
171                 android:id="@+id/textView11"
172                 android:layout_weight="1" />
173
174             <TextView
175                 android:layout_width="wrap_content"
176                 android:layout_height="wrap_content"
177                 android:text="{psk}"
178                 android:id="@+id/pskInfo"
179                 android:paddingLeft="8dp"
180                 android:layout_weight="1" />
181         </TableRow>
182
183         <TableRow
184             android:layout_width="match_parent"
185             android:layout_height="match_parent"
186             android:measureWithLargestChild="false">
187
188         </TableRow>
189
190     </TableLayout>
191
192     <RelativeLayout
193         android:layout_width="match_parent"
194         android:layout_height="wrap_content"
195         android:id="@+id/insecureNetWarning">
196
197         <TextView
198             android:layout_width="wrap_content"
199             android:layout_height="wrap_content"
200             android:text="@string/wifisettings_insecure_network"
201             android:id="@+id/textView12"
202             android:layout_weight="2"
203             android:textColor="#FF0000" />
204     </RelativeLayout>
205
206     <RelativeLayout
207         android:layout_width="match_parent"
208         android:layout_height="wrap_content"
209         android:padding="8dp">
210
211         <TextView
212             android:layout_width="wrap_content"
213             android:layout_height="wrap_content"
214             android:text="@string/wifisettings_username_caption"
215             android:id="@+id/textView5"
216             android:layout_alignBottom="@+id/wifiUsername"
217             android:layout_marginBottom="8dp" />
218
219         <TextView
220             android:layout_width="wrap_content"
221             android:layout_height="wrap_content"
222             android:text="@string/wifisettings_password_caption"
223             android:id="@+id/textView9"
224             android:layout_alignBottom="@+id/wifiPassword"
225             android:layout_marginBottom="8dp" />
226
227         <EditText
228             android:layout_width="wrap_content"
229             android:layout_height="wrap_content"
230             android:id="@+id/wifiUsername"
231             android:layout_toRightOf="@+id/textView5"
232             android:layout_marginLeft="8dp"
233             android:layout_alignRight="@+id/wifiPassword"
234             android:layout_alignEnd="@+id/wifiPassword" />
235
236         <EditText
237             android:layout_width="wrap_content"
238             android:layout_height="wrap_content"
239             android:inputType="textPassword"
240             android:ems="10"
241             android:id="@+id/wifiPassword"
242             android:layout_centerHorizontal="true"
243             android:layout_below="@+id/wifiUsername"
244             android:layout_toRightOf="@+id/textView5"
245             android:layout_marginLeft="8dp" />
246     </RelativeLayout>
247
248     <RelativeLayout
249         android:layout_width="match_parent"
250         android:layout_height="wrap_content"
251         android:layout_gravity="center_horizontal">
252
253         <Button
254             android:layout_width="wrap_content"
255             android:layout_height="wrap_content"
256             android:text="@string/wifisettings_connect_button"
257             android:id="@+id/wifiConnectBtn"
258             android:layout_alignParentTop="true"
259             android:layout_centerHorizontal="true" />
260     </RelativeLayout>
261
262 </LinearLayout>