1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2011 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<!-- All ids in this layout must be in wifi_dialog.xml --> 17<LinearLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 android:orientation="vertical" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 <!-- UI components that should be shown appropriately --> 23 <FrameLayout 24 android:id="@+id/eap_not_supported" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:minHeight="360dip" 28 android:orientation="vertical" 29 android:visibility="gone"> 30 <TextView 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:lineSpacingExtra="12dip" 34 android:text="Foo" 35 android:textAppearance="?android:attr/textAppearanceMedium" 36 android:textSize="20sp" /> 37 </FrameLayout> 38 <!-- In "add network" flow, we have security type field (@id/security below) below 39 this View, so need a bit different layout than the other flow, in which we'll use 40 @id/eap_not_supported. --> 41 <FrameLayout 42 android:id="@+id/eap_not_supported_for_add_network" 43 android:layout_width="match_parent" 44 android:layout_height="wrap_content" 45 android:orientation="vertical" 46 android:visibility="gone"> 47 <TextView 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:lineSpacingExtra="12dip" 51 android:text="Bar" 52 android:textAppearance="?android:attr/textAppearanceMedium" 53 android:textSize="20sp" /> 54 </FrameLayout> 55 <LinearLayout 56 android:id="@+id/wps_fields" 57 android:layout_width="match_parent" 58 android:layout_height="wrap_content" 59 android:orientation="vertical" 60 android:visibility="gone"> 61 <TextView 62 android:layout_width="match_parent" 63 android:minWidth="128dip" 64 android:layout_height="wrap_content" 65 android:text="Blah" 66 android:textAppearance="?android:attr/textAppearanceMedium" 67 android:textSize="20sp" 68 android:gravity="bottom" /> 69 70 <EditText 71 android:id="@+id/wps_pin" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 android:singleLine="true" 75 android:inputType="textPassword" 76 android:textAppearance="?android:attr/textAppearanceMedium" 77 android:textSize="20sp" /> 78 </LinearLayout> 79 <TableLayout 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:layout_marginBottom="16dip"> 83 <!-- To accomodate @id/type into TableLayout, we splitted the layout into two: 84 @id/type_ssid and @id/type_security. --> 85 <TableRow 86 android:id="@+id/type_ssid" 87 android:minHeight="56dip" 88 android:visibility="gone"> 89 <TextView 90 android:id="@+id/ssid_text" 91 android:layout_width="wrap_content" 92 android:minWidth="128dip" 93 android:layout_height="wrap_content" 94 android:minHeight="56dip" 95 android:paddingRight="16dip" 96 android:layout_alignParentLeft="true" 97 android:text="Whatever" 98 android:textAppearance="?android:attr/textAppearanceMedium" 99 android:textSize="20sp" 100 android:gravity="left|center_vertical" /> 101 102 <FrameLayout 103 android:id="@+id/ssid_layout" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 android:layout_alignBottom="@id/ssid_text" 107 android:layout_toRightOf="@id/ssid_text"> 108 <EditText 109 android:id="@+id/ssid" 110 android:layout_width="368dip" 111 android:layout_height="wrap_content" 112 android:singleLine="true" 113 android:inputType="textNoSuggestions" 114 android:textAppearance="?android:attr/textAppearanceMedium" 115 android:textSize="20sp" /> 116 </FrameLayout> 117 </TableRow> 118 119 <TableRow 120 android:id="@+id/security_fields" 121 android:minHeight="56dip" 122 android:visibility="gone"> 123 <TextView 124 android:id="@+id/password_text" 125 android:layout_width="wrap_content" 126 android:minWidth="128dip" 127 android:layout_height="wrap_content" 128 android:minHeight="56dip" 129 android:text="Whenever" 130 android:textAppearance="?android:attr/textAppearanceMedium" 131 android:textSize="20sp" 132 android:gravity="left|center_vertical" /> 133 134 <LinearLayout 135 android:id="@+id/password_layout" 136 android:layout_width="wrap_content" 137 android:layout_height="wrap_content" 138 android:gravity="bottom"> 139 <EditText 140 android:id="@+id/password" 141 android:layout_width="368dip" 142 android:layout_height="wrap_content" 143 android:minHeight="56dip" 144 android:singleLine="true" 145 android:password="true" 146 android:textAppearance="?android:attr/textAppearanceMedium" 147 android:textSize="20sp" /> 148 </LinearLayout> 149 150 <!-- It looks CheckBox isn't aligned well with TableRow --> 151 <FrameLayout 152 android:layout_width="wrap_content" 153 android:layout_height="wrap_content"> 154 <CheckBox 155 android:id="@+id/show_password" 156 android:layout_width="match_parent" 157 android:layout_height="wrap_content" 158 android:minHeight="56dip" 159 android:text="However" 160 android:textAppearance="?android:attr/textAppearanceMedium" 161 android:textSize="20sp" /> 162 </FrameLayout> 163 </TableRow> 164 165 <TableRow 166 android:id="@+id/type_security" 167 android:minHeight="56dip" 168 android:visibility="gone"> 169 <TextView 170 android:id="@+id/security_text" 171 android:layout_width="wrap_content" 172 android:minWidth="128dip" 173 android:layout_height="wrap_content" 174 android:minHeight="56dip" 175 android:text="Whoever" 176 android:textAppearance="?android:attr/textAppearanceMedium" 177 android:textSize="20sp" 178 android:gravity="bottom"/> 179 180 <FrameLayout 181 android:layout_width="wrap_content" 182 android:layout_height="wrap_content" 183 android:gravity="bottom"> 184 <Spinner 185 android:id="@+id/security" 186 android:layout_width="368dip" 187 android:layout_height="wrap_content" 188 android:minHeight="56dip" 189 android:paddingLeft="4dip"/> 190 </FrameLayout> 191 </TableRow> 192 </TableLayout> 193 194 <!-- All the views below are "gone". 195 We want them as data storage, not as UI components. --> 196 <LinearLayout 197 android:orientation="vertical" 198 android:layout_width="match_parent" 199 android:layout_height="match_parent" 200 android:visibility="gone"> 201 202 <LinearLayout android:id="@+id/info" 203 android:layout_width="match_parent" 204 android:layout_height="wrap_content" 205 android:orientation="vertical"/> 206 207 <LinearLayout android:id="@+id/setup_fields" 208 android:layout_width="match_parent" 209 android:layout_height="wrap_content" 210 android:orientation="vertical" 211 android:visibility="gone"> 212 213 <TextView 214 android:layout_width="match_parent" 215 android:layout_height="wrap_content" 216 android:text="On the top" /> 217 218 <Spinner android:id="@+id/network_setup" 219 android:layout_width="match_parent" 220 android:layout_height="wrap_content" /> 221 222 </LinearLayout> 223 224 <!-- android:id="@+id/security_fields" --> 225 <LinearLayout 226 android:layout_width="match_parent" 227 android:layout_height="wrap_content" 228 android:orientation="vertical" 229 android:visibility="gone"> 230 231 <LinearLayout android:id="@+id/eap" 232 android:layout_width="match_parent" 233 android:layout_height="wrap_content" 234 android:orientation="vertical" 235 android:visibility="gone"> 236 237 <TextView 238 android:layout_width="match_parent" 239 android:layout_height="wrap_content" 240 android:text="On the bottom" /> 241 242 <Spinner android:id="@+id/method" 243 android:layout_width="match_parent" 244 android:layout_height="wrap_content" /> 245 246 <TextView 247 android:layout_width="match_parent" 248 android:layout_height="wrap_content" 249 android:text="On the side" /> 250 251 <Spinner android:id="@+id/phase2" 252 android:layout_width="match_parent" 253 android:layout_height="wrap_content" /> 254 255 <TextView 256 android:layout_width="match_parent" 257 android:layout_height="wrap_content" 258 android:text="SRH" /> 259 260 <Spinner android:id="@+id/ca_cert" 261 android:layout_width="match_parent" 262 android:layout_height="wrap_content" /> 263 264 <TextView 265 android:layout_width="match_parent" 266 android:layout_height="wrap_content" 267 android:text="Enjoyable" /> 268 269 <Spinner android:id="@+id/user_cert" 270 android:layout_width="match_parent" 271 android:layout_height="wrap_content" /> 272 273 <TextView 274 android:layout_width="match_parent" 275 android:layout_height="wrap_content" 276 android:text="Fantastic" /> 277 278 <EditText android:id="@+id/identity" 279 android:layout_width="match_parent" 280 android:layout_height="wrap_content" 281 android:singleLine="true" 282 android:inputType="textNoSuggestions" /> 283 284 <TextView 285 android:layout_width="match_parent" 286 android:layout_height="wrap_content" 287 android:text="Superb" /> 288 289 <EditText android:id="@+id/anonymous" 290 android:layout_width="match_parent" 291 android:layout_height="wrap_content" 292 android:singleLine="true" 293 android:inputType="textNoSuggestions" /> 294 </LinearLayout> <!-- android:id="@+id/eap" --> 295 296 <!-- <TextView android:layout_width="match_parent" 297 android:layout_height="wrap_content" 298 android:text="@string/wifi_password" /> 299 300 <EditText android:id="@+id/password" 301 android:layout_width="match_parent" 302 android:layout_height="wrap_content" 303 android:singleLine="true" 304 android:password="true" /> 305 306 <CheckBox android:id="@+id/show_password" 307 android:layout_width="match_parent" 308 android:layout_height="wrap_content" 309 android:text="@string/wifi_show_password" /> --> 310 </LinearLayout> <!-- android:id="@+id/security_fields" --> 311 312 <LinearLayout android:id="@+id/proxy_settings_fields" 313 android:layout_width="match_parent" 314 android:layout_height="wrap_content" 315 android:orientation="vertical" 316 android:visibility="gone"> 317 318 <TextView android:id="@+id/proxy_settings_title" 319 android:layout_width="match_parent" 320 android:layout_height="wrap_content" 321 android:text="Heavenly" /> 322 323 <Spinner android:id="@+id/proxy_settings" 324 android:layout_width="match_parent" 325 android:layout_height="wrap_content" /> 326 </LinearLayout> 327 328 <LinearLayout android:id="@+id/proxy_warning_limited_support" 329 android:layout_width="match_parent" 330 android:layout_height="wrap_content" 331 android:orientation="vertical" 332 android:visibility="gone"> 333 334 <!-- Dummy to enable right-justification of warning --> 335 <TextView 336 android:layout_width="match_parent" 337 android:layout_height="wrap_content" /> 338 339 <TextView 340 android:layout_width="match_parent" 341 android:layout_height="wrap_content" 342 android:text="Orgasmic" /> 343 </LinearLayout> 344 345 <LinearLayout android:id="@+id/proxy_fields" 346 android:layout_width="match_parent" 347 android:layout_height="wrap_content" 348 android:orientation="vertical" 349 android:visibility="gone"> 350 <TextView android:layout_width="match_parent" 351 android:layout_height="wrap_content" 352 android:text="Really" /> 353 354 <EditText android:id="@+id/proxy_hostname" 355 android:layout_width="match_parent" 356 android:layout_height="wrap_content" 357 android:singleLine="true" 358 android:inputType="textNoSuggestions" /> 359 360 <TextView android:layout_width="match_parent" 361 android:layout_height="wrap_content" 362 android:text="Really really" /> 363 364 <EditText android:id="@+id/proxy_port" 365 android:layout_width="match_parent" 366 android:layout_height="wrap_content" 367 android:singleLine="true" 368 android:inputType="textNoSuggestions" /> 369 370 <TextView android:layout_width="match_parent" 371 android:layout_height="wrap_content" 372 android:text="Really really with cherries on top" /> 373 374 <EditText android:id="@+id/proxy_exclusionlist" 375 android:layout_width="match_parent" 376 android:layout_height="wrap_content" 377 android:singleLine="true" 378 android:inputType="textNoSuggestions" /> 379 380 </LinearLayout> 381 382 <LinearLayout android:id="@+id/ip_fields" 383 android:layout_width="match_parent" 384 android:layout_height="wrap_content" 385 android:orientation="vertical" 386 android:visibility="gone"> 387 388 <TextView 389 android:layout_width="match_parent" 390 android:layout_height="wrap_content" 391 android:text="Mmmmm... cherries" /> 392 393 <Spinner android:id="@+id/ip_settings" 394 android:layout_width="match_parent" 395 android:layout_height="wrap_content" /> 396 </LinearLayout> 397 398 <LinearLayout android:id="@+id/staticip" 399 android:layout_width="match_parent" 400 android:layout_height="wrap_content" 401 android:orientation="vertical" 402 android:visibility="gone"> 403 <TextView 404 android:layout_width="match_parent" 405 android:layout_height="wrap_content" 406 android:text="I mean Mmmmm.. cherries" /> 407 408 <EditText android:id="@+id/ipaddress" 409 android:layout_width="match_parent" 410 android:layout_height="wrap_content" 411 android:singleLine="true" 412 android:inputType="textNoSuggestions" /> 413 414 <TextView 415 android:layout_width="match_parent" 416 android:layout_height="wrap_content" 417 android:text="Shorter" /> 418 419 <EditText android:id="@+id/gateway" 420 android:layout_width="match_parent" 421 android:layout_height="wrap_content" 422 android:singleLine="true" 423 android:inputType="textNoSuggestions" /> 424 425 <TextView 426 android:layout_width="match_parent" 427 android:layout_height="wrap_content" 428 android:text="is" /> 429 430 <EditText android:id="@+id/network_prefix_length" 431 android:layout_width="match_parent" 432 android:layout_height="wrap_content" 433 android:singleLine="true" 434 android:inputType="textNoSuggestions" /> 435 436 <TextView 437 android:layout_width="match_parent" 438 android:layout_height="wrap_content" 439 android:text="better" /> 440 441 <EditText android:id="@+id/dns1" 442 android:layout_width="match_parent" 443 android:layout_height="wrap_content" 444 android:singleLine="true" 445 android:inputType="textNoSuggestions" /> 446 447 <TextView 448 android:layout_width="match_parent" 449 android:layout_height="wrap_content" 450 android:text="always" /> 451 452 <EditText android:id="@+id/dns2" 453 android:layout_width="match_parent" 454 android:layout_height="wrap_content" 455 android:singleLine="true" 456 android:inputType="textNoSuggestions" /> 457 458 </LinearLayout> 459 </LinearLayout> 460</LinearLayout> 461