1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2021 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17 18<LinearLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" 22 android:id="@+id/internet_connectivity_dialog" 23 android:layout_width="@dimen/large_dialog_width" 24 android:layout_height="wrap_content" 25 android:orientation="vertical"> 26 27 <LinearLayout 28 android:layout_width="match_parent" 29 android:layout_height="wrap_content" 30 style="@style/Widget.SliceView.Panel" 31 android:gravity="center_vertical|center_horizontal" 32 android:layout_marginTop="24dp" 33 android:layout_marginBottom="@dimen/internet_dialog_network_layout_margin" 34 android:orientation="vertical"> 35 36 <TextView 37 android:id="@+id/internet_dialog_title" 38 android:ellipsize="end" 39 android:gravity="center_vertical|center_horizontal" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:textAppearance="@style/TextAppearance.InternetDialog" 43 android:textSize="24sp"/> 44 45 <TextView 46 android:id="@+id/internet_dialog_subtitle" 47 android:gravity="center_vertical|center_horizontal" 48 android:layout_width="wrap_content" 49 android:layout_height="wrap_content" 50 android:layout_marginTop="4dp" 51 android:ellipsize="end" 52 android:maxLines="1" 53 android:textAppearance="@style/TextAppearance.InternetDialog.Secondary"/> 54 </LinearLayout> 55 56 <LinearLayout 57 android:layout_width="@dimen/internet_dialog_progress_bar_width" 58 android:layout_height="wrap_content" 59 android:layout_gravity="center_horizontal" 60 android:layout_marginBottom="@dimen/internet_dialog_network_layout_margin" 61 android:orientation="vertical"> 62 63 <View 64 android:id="@+id/divider" 65 android:layout_width="match_parent" 66 android:layout_height="4dp" 67 android:layout_gravity="center_vertical|center_horizontal" 68 android:background="?androidprv:attr/colorSurfaceVariant"/> 69 70 <ProgressBar 71 android:id="@+id/wifi_searching_progress" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 android:layout_gravity="center_horizontal" 75 android:visibility="gone" 76 style="@style/TrimmedHorizontalProgressBar"/> 77 </LinearLayout> 78 79 <androidx.core.widget.NestedScrollView 80 android:id="@+id/scroll_view" 81 android:layout_width="match_parent" 82 android:layout_height="match_parent"> 83 <LinearLayout 84 android:id="@+id/scroll_layout" 85 android:layout_width="match_parent" 86 android:layout_height="wrap_content" 87 android:orientation="vertical"> 88 <LinearLayout 89 android:layout_width="match_parent" 90 android:layout_height="wrap_content" 91 android:orientation="vertical"> 92 93 <LinearLayout 94 android:id="@+id/ethernet_layout" 95 style="@style/InternetDialog.Network" 96 android:background="@drawable/settingslib_switch_bar_bg_on" 97 android:visibility="gone"> 98 99 <FrameLayout 100 android:layout_width="24dp" 101 android:layout_height="24dp" 102 android:layout_gravity="center_vertical|start" 103 android:clickable="false"> 104 <ImageView 105 android:layout_width="wrap_content" 106 android:layout_height="wrap_content" 107 android:layout_gravity="center" 108 android:autoMirrored="true" 109 android:src="@drawable/stat_sys_ethernet_fully" 110 android:tint="@color/connected_network_primary_color"/> 111 </FrameLayout> 112 113 <LinearLayout 114 android:layout_width="wrap_content" 115 android:layout_height="match_parent" 116 android:layout_weight="1" 117 android:gravity="start|center_vertical" 118 android:orientation="vertical" 119 android:clickable="false"> 120 <TextView 121 android:text="@string/ethernet_label" 122 style="@style/InternetDialog.NetworkTitle.Active"/> 123 <TextView 124 android:text="@string/to_switch_networks_disconnect_ethernet" 125 style="@style/InternetDialog.NetworkSummary.Active"/> 126 </LinearLayout> 127 </LinearLayout> 128 129 <LinearLayout 130 android:id="@+id/mobile_network_layout" 131 style="@style/InternetDialog.Network"> 132 133 <FrameLayout 134 android:layout_width="24dp" 135 android:layout_height="24dp" 136 android:clickable="false" 137 android:layout_gravity="center_vertical|start"> 138 <ImageView 139 android:id="@+id/signal_icon" 140 android:autoMirrored="true" 141 android:layout_width="wrap_content" 142 android:layout_height="wrap_content" 143 android:layout_gravity="center"/> 144 </FrameLayout> 145 146 <LinearLayout 147 android:layout_weight="1" 148 android:orientation="vertical" 149 android:clickable="false" 150 android:layout_width="wrap_content" 151 android:layout_height="match_parent" 152 android:gravity="start|center_vertical"> 153 <TextView 154 android:id="@+id/mobile_title" 155 android:maxLines="1" 156 style="@style/InternetDialog.NetworkTitle"/> 157 <TextView 158 android:id="@+id/mobile_summary" 159 style="@style/InternetDialog.NetworkSummary"/> 160 <TextView 161 android:id="@+id/airplane_mode_summary" 162 android:text="@string/airplane_mode" 163 android:visibility="gone" 164 style="@style/InternetDialog.NetworkSummary"/> 165 </LinearLayout> 166 167 <View 168 android:id="@+id/mobile_toggle_divider" 169 android:layout_width="1dp" 170 android:layout_height="28dp" 171 android:layout_marginStart="7dp" 172 android:layout_marginEnd="16dp" 173 android:layout_gravity="center_vertical"/> 174 175 <FrameLayout 176 android:layout_width="@dimen/settingslib_switch_track_width" 177 android:layout_height="48dp" 178 android:layout_gravity="end|center_vertical"> 179 <Switch 180 android:id="@+id/mobile_toggle" 181 android:contentDescription="@string/mobile_data_settings_title" 182 android:switchMinWidth="@dimen/settingslib_switch_track_width" 183 android:layout_gravity="center" 184 android:layout_width="@dimen/settingslib_switch_track_width" 185 android:layout_height="match_parent" 186 android:track="@drawable/settingslib_track_selector" 187 android:thumb="@drawable/settingslib_thumb_selector" 188 android:theme="@style/MainSwitch.Settingslib"/> 189 </FrameLayout> 190 191 </LinearLayout> 192 193 <ViewStub android:id="@+id/secondary_mobile_network_stub" 194 android:inflatedId="@+id/secondary_mobile_network_layout" 195 android:layout="@layout/qs_dialog_secondary_mobile_network" 196 style="@style/InternetDialog.Network"/> 197 198 <LinearLayout 199 android:id="@+id/turn_on_wifi_layout" 200 style="@style/InternetDialog.Network" 201 android:layout_height="@dimen/internet_dialog_wifi_network_height" 202 android:gravity="center" 203 android:clickable="false" 204 android:focusable="false"> 205 206 <LinearLayout 207 android:layout_width="wrap_content" 208 android:layout_height="match_parent" 209 android:layout_weight="1" 210 android:gravity="start|center_vertical" 211 android:orientation="vertical" 212 android:clickable="false"> 213 <TextView 214 android:id="@+id/wifi_toggle_title" 215 android:text="@string/turn_on_wifi" 216 android:layout_width="wrap_content" 217 android:layout_height="wrap_content" 218 android:gravity="start|center_vertical" 219 android:textAppearance="@style/TextAppearance.InternetDialog"/> 220 <TextView 221 android:id="@+id/wifi_toggle_summary" 222 android:text="@string/wifitrackerlib_admin_restricted_network" 223 android:layout_width="wrap_content" 224 android:layout_height="wrap_content" 225 android:gravity="start|center_vertical" 226 android:textAppearance="@style/TextAppearance.InternetDialog.Secondary" 227 android:visibility="gone"/> 228 </LinearLayout> 229 230 <FrameLayout 231 android:layout_width="@dimen/settingslib_switch_track_width" 232 android:layout_height="48dp" 233 android:layout_marginTop="10dp" 234 android:layout_marginBottom="10dp"> 235 <Switch 236 android:id="@+id/wifi_toggle" 237 android:contentDescription="@string/turn_on_wifi" 238 android:switchMinWidth="@dimen/settingslib_switch_track_width" 239 android:layout_gravity="center" 240 android:layout_width="@dimen/settingslib_switch_track_width" 241 android:layout_height="match_parent" 242 android:track="@drawable/settingslib_track_selector" 243 android:thumb="@drawable/settingslib_thumb_selector" 244 android:theme="@style/MainSwitch.Settingslib"/> 245 </FrameLayout> 246 247 </LinearLayout> 248 249 <LinearLayout 250 android:id="@+id/wifi_connected_layout" 251 style="@style/InternetDialog.Network" 252 android:layout_height="@dimen/internet_dialog_wifi_network_height" 253 android:paddingStart="20dp" 254 android:paddingEnd="24dp" 255 android:background="@drawable/settingslib_switch_bar_bg_on" 256 android:visibility="gone"> 257 258 <FrameLayout 259 android:layout_width="24dp" 260 android:layout_height="24dp" 261 android:clickable="false" 262 android:layout_gravity="center_vertical|start"> 263 <ImageView 264 android:id="@+id/wifi_connected_icon" 265 android:layout_width="match_parent" 266 android:layout_height="match_parent" 267 android:scaleType="fitCenter" 268 android:layout_gravity="center"/> 269 </FrameLayout> 270 271 <LinearLayout 272 android:orientation="vertical" 273 android:clickable="false" 274 android:layout_width="wrap_content" 275 android:layout_height="@dimen/internet_dialog_wifi_network_height" 276 android:layout_marginEnd="30dp" 277 android:layout_weight="1" 278 android:gravity="start|center_vertical"> 279 <TextView 280 android:id="@+id/wifi_connected_title" 281 style="@style/InternetDialog.NetworkTitle.Active" 282 android:textSize="14sp"/> 283 <TextView 284 android:id="@+id/wifi_connected_summary" 285 style="@style/InternetDialog.NetworkSummary.Active"/> 286 </LinearLayout> 287 288 <FrameLayout 289 android:layout_width="24dp" 290 android:layout_height="match_parent" 291 android:clickable="false" 292 android:layout_gravity="end|center_vertical" 293 android:gravity="center"> 294 <ImageView 295 android:id="@+id/wifi_settings_icon" 296 android:src="@drawable/ic_settings_24dp" 297 android:layout_width="24dp" 298 android:layout_gravity="end|center_vertical" 299 android:layout_height="wrap_content"/> 300 </FrameLayout> 301 302 </LinearLayout> 303 304 <androidx.recyclerview.widget.RecyclerView 305 android:id="@+id/wifi_list_layout" 306 android:scrollbars="vertical" 307 android:layout_width="match_parent" 308 android:layout_height="wrap_content" 309 android:overScrollMode="never" 310 android:nestedScrollingEnabled="false"/> 311 312 </LinearLayout> 313 314 <LinearLayout 315 android:id="@+id/see_all_layout" 316 style="@style/InternetDialog.Network" 317 android:layout_height="64dp" 318 android:paddingStart="20dp"> 319 320 <FrameLayout 321 android:layout_width="24dp" 322 android:layout_height="24dp" 323 android:clickable="false" 324 android:layout_gravity="center_vertical|start"> 325 <ImageView 326 android:id="@+id/arrow_forward" 327 android:src="@drawable/ic_arrow_forward" 328 android:layout_width="wrap_content" 329 android:layout_height="wrap_content" 330 android:layout_gravity="center"/> 331 </FrameLayout> 332 333 <FrameLayout 334 android:orientation="vertical" 335 android:clickable="false" 336 android:layout_width="match_parent" 337 android:layout_height="match_parent" 338 android:layout_marginStart="@dimen/internet_dialog_network_layout_margin"> 339 <TextView 340 android:text="@string/see_all_networks" 341 android:layout_width="wrap_content" 342 android:layout_height="match_parent" 343 android:gravity="start|center_vertical" 344 android:textAppearance="@style/TextAppearance.InternetDialog" 345 android:textSize="14sp"/> 346 </FrameLayout> 347 </LinearLayout> 348 349 <LinearLayout 350 android:id="@+id/wifi_scan_notify_layout" 351 style="@style/InternetDialog.Network" 352 android:orientation="vertical" 353 android:layout_height="wrap_content" 354 android:paddingBottom="4dp" 355 android:clickable="false" 356 android:focusable="false" 357 android:visibility="gone"> 358 359 <LinearLayout 360 android:layout_width="wrap_content" 361 android:layout_height="wrap_content" 362 android:minWidth="56dp" 363 android:gravity="start|top" 364 android:orientation="horizontal" 365 android:paddingEnd="12dp" 366 android:paddingTop="16dp" 367 android:paddingBottom="4dp"> 368 <ImageView 369 android:src="@drawable/ic_info_outline" 370 android:layout_width="wrap_content" 371 android:layout_height="wrap_content" 372 android:tint="?android:attr/textColorTertiary"/> 373 </LinearLayout> 374 375 <LinearLayout 376 android:layout_width="wrap_content" 377 android:layout_height="wrap_content" 378 android:orientation="vertical"> 379 <TextView 380 android:id="@+id/wifi_scan_notify_text" 381 android:layout_width="wrap_content" 382 android:layout_height="wrap_content" 383 android:paddingTop="16dp" 384 android:paddingBottom="8dp" 385 android:textColor="?android:attr/textColorSecondary" 386 android:clickable="true"/> 387 </LinearLayout> 388 </LinearLayout> 389 390 <androidx.constraintlayout.widget.ConstraintLayout 391 android:id="@+id/button_layout" 392 android:layout_width="match_parent" 393 android:layout_height="wrap_content" 394 android:layout_marginTop="8dp" 395 android:layout_marginStart="@dimen/dialog_side_padding" 396 android:layout_marginEnd="@dimen/dialog_side_padding" 397 android:layout_marginBottom="@dimen/dialog_bottom_padding" 398 android:clickable="false" 399 android:focusable="false"> 400 401 <Button 402 android:id="@+id/apm_button" 403 style="@style/Widget.Dialog.Button.BorderButton" 404 android:layout_width="wrap_content" 405 android:layout_height="wrap_content" 406 android:layout_marginEnd="10dp" 407 android:clickable="true" 408 android:ellipsize="end" 409 android:focusable="true" 410 android:maxLines="1" 411 android:text="@string/turn_off_airplane_mode" 412 app:layout_constrainedWidth="true" 413 app:layout_constraintHorizontal_bias="0" 414 app:layout_constraintBottom_toBottomOf="parent" 415 app:layout_constraintEnd_toStartOf="@id/share_wifi_button" 416 app:layout_constraintStart_toStartOf="parent" 417 app:layout_constraintTop_toTopOf="parent" /> 418 419 <Button 420 android:id="@+id/share_wifi_button" 421 style="?android:attr/buttonBarNeutralButtonStyle" 422 android:layout_width="wrap_content" 423 android:layout_height="wrap_content" 424 android:layout_marginEnd="10dp" 425 android:clickable="true" 426 android:ellipsize="end" 427 android:focusable="true" 428 android:maxLines="1" 429 android:visibility="gone" 430 app:layout_constraintHorizontal_bias="0" 431 android:text="@string/share_wifi_button_text" 432 app:layout_constrainedWidth="true" 433 app:layout_constraintBottom_toBottomOf="parent" 434 app:layout_constraintEnd_toStartOf="@id/done_button" 435 app:layout_constraintStart_toEndOf="@id/apm_button" 436 app:layout_constraintTop_toTopOf="parent" /> 437 438 <Button 439 android:id="@+id/done_button" 440 style="@style/Widget.Dialog.Button" 441 android:layout_width="wrap_content" 442 android:layout_height="wrap_content" 443 android:clickable="true" 444 android:ellipsize="end" 445 android:focusable="true" 446 android:maxLines="1" 447 android:text="@string/inline_done_button" 448 app:layout_constrainedWidth="true" 449 app:layout_constraintBottom_toBottomOf="parent" 450 app:layout_constraintEnd_toEndOf="parent" 451 app:layout_constraintTop_toTopOf="parent" /> 452 </androidx.constraintlayout.widget.ConstraintLayout> 453 454 </LinearLayout> 455 </androidx.core.widget.NestedScrollView> 456</LinearLayout> 457