440 lines
21 KiB
XML
440 lines
21 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!--
|
||
|
~ Copyright (C) 2021 The Android Open Source Project
|
||
|
~
|
||
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
~ you may not use this file except in compliance with the License.
|
||
|
~ You may obtain a copy of the License at
|
||
|
~
|
||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||
|
~
|
||
|
~ Unless required by applicable law or agreed to in writing, software
|
||
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
~ See the License for the specific language governing permissions and
|
||
|
~ limitations under the License.
|
||
|
-->
|
||
|
|
||
|
<LinearLayout
|
||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||
|
android:id="@+id/internet_connectivity_dialog"
|
||
|
android:layout_width="@dimen/large_dialog_width"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
style="@style/Widget.SliceView.Panel"
|
||
|
android:gravity="center_vertical|center_horizontal"
|
||
|
android:layout_marginTop="24dp"
|
||
|
android:layout_marginBottom="@dimen/internet_dialog_network_layout_margin"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<TextView
|
||
|
android:id="@+id/internet_dialog_title"
|
||
|
android:ellipsize="end"
|
||
|
android:gravity="center_vertical|center_horizontal"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:textAppearance="@style/TextAppearance.InternetDialog"
|
||
|
android:textSize="24sp"/>
|
||
|
|
||
|
<TextView
|
||
|
android:id="@+id/internet_dialog_subtitle"
|
||
|
android:gravity="center_vertical|center_horizontal"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginTop="4dp"
|
||
|
android:ellipsize="end"
|
||
|
android:maxLines="1"
|
||
|
android:textAppearance="@style/TextAppearance.InternetDialog.Secondary"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="@dimen/internet_dialog_progress_bar_width"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center_horizontal"
|
||
|
android:layout_marginBottom="@dimen/internet_dialog_network_layout_margin"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<View
|
||
|
android:id="@+id/divider"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="4dp"
|
||
|
android:layout_gravity="center_vertical|center_horizontal"
|
||
|
android:background="?androidprv:attr/colorSurfaceVariant"/>
|
||
|
|
||
|
<ProgressBar
|
||
|
android:id="@+id/wifi_searching_progress"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center_horizontal"
|
||
|
android:visibility="gone"
|
||
|
style="@style/TrimmedHorizontalProgressBar"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<androidx.core.widget.NestedScrollView
|
||
|
android:id="@+id/scroll_view"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="match_parent">
|
||
|
<LinearLayout
|
||
|
android:id="@+id/scroll_layout"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical">
|
||
|
<LinearLayout
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/ethernet_layout"
|
||
|
style="@style/InternetDialog.Network"
|
||
|
android:background="@drawable/settingslib_switch_bar_bg_on"
|
||
|
android:visibility="gone">
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_height="24dp"
|
||
|
android:layout_gravity="center_vertical|start"
|
||
|
android:clickable="false">
|
||
|
<ImageView
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center"
|
||
|
android:autoMirrored="true"
|
||
|
android:src="@drawable/stat_sys_ethernet_fully"
|
||
|
android:tint="@color/connected_network_primary_color"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="match_parent"
|
||
|
android:layout_weight="1"
|
||
|
android:gravity="start|center_vertical"
|
||
|
android:orientation="vertical"
|
||
|
android:clickable="false">
|
||
|
<TextView
|
||
|
android:text="@string/ethernet_label"
|
||
|
style="@style/InternetDialog.NetworkTitle.Active"/>
|
||
|
<TextView
|
||
|
android:text="@string/to_switch_networks_disconnect_ethernet"
|
||
|
style="@style/InternetDialog.NetworkSummary.Active"/>
|
||
|
</LinearLayout>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/mobile_network_layout"
|
||
|
style="@style/InternetDialog.Network">
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_height="24dp"
|
||
|
android:clickable="false"
|
||
|
android:layout_gravity="center_vertical|start">
|
||
|
<ImageView
|
||
|
android:id="@+id/signal_icon"
|
||
|
android:autoMirrored="true"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_weight="1"
|
||
|
android:orientation="vertical"
|
||
|
android:clickable="false"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="match_parent"
|
||
|
android:gravity="start|center_vertical">
|
||
|
<TextView
|
||
|
android:id="@+id/mobile_title"
|
||
|
android:maxLines="1"
|
||
|
style="@style/InternetDialog.NetworkTitle"/>
|
||
|
<TextView
|
||
|
android:id="@+id/mobile_summary"
|
||
|
style="@style/InternetDialog.NetworkSummary"/>
|
||
|
<TextView
|
||
|
android:id="@+id/airplane_mode_summary"
|
||
|
android:text="@string/airplane_mode"
|
||
|
android:visibility="gone"
|
||
|
style="@style/InternetDialog.NetworkSummary"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<View
|
||
|
android:id="@+id/mobile_toggle_divider"
|
||
|
android:layout_width="1dp"
|
||
|
android:layout_height="28dp"
|
||
|
android:layout_marginStart="7dp"
|
||
|
android:layout_marginEnd="16dp"
|
||
|
android:layout_gravity="center_vertical"
|
||
|
android:background="?android:attr/textColorSecondary"/>
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_height="48dp"
|
||
|
android:layout_gravity="end|center_vertical">
|
||
|
<Switch
|
||
|
android:id="@+id/mobile_toggle"
|
||
|
android:contentDescription="@string/mobile_data_settings_title"
|
||
|
android:switchMinWidth="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_gravity="center"
|
||
|
android:layout_width="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_height="match_parent"
|
||
|
android:track="@drawable/settingslib_track_selector"
|
||
|
android:thumb="@drawable/settingslib_thumb_selector"
|
||
|
android:theme="@style/MainSwitch.Settingslib"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
<ViewStub android:id="@+id/secondary_mobile_network_stub"
|
||
|
android:inflatedId="@+id/secondary_mobile_network_layout"
|
||
|
android:layout="@layout/qs_dialog_secondary_mobile_network"
|
||
|
style="@style/InternetDialog.Network"/>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/turn_on_wifi_layout"
|
||
|
style="@style/InternetDialog.Network"
|
||
|
android:layout_height="@dimen/internet_dialog_wifi_network_height"
|
||
|
android:gravity="center"
|
||
|
android:clickable="false"
|
||
|
android:focusable="false">
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="match_parent"
|
||
|
android:layout_weight="1"
|
||
|
android:gravity="start|center_vertical"
|
||
|
android:orientation="vertical"
|
||
|
android:clickable="false">
|
||
|
<TextView
|
||
|
android:id="@+id/wifi_toggle_title"
|
||
|
android:text="@string/turn_on_wifi"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:gravity="start|center_vertical"
|
||
|
android:textAppearance="@style/TextAppearance.InternetDialog"/>
|
||
|
<TextView
|
||
|
android:id="@+id/wifi_toggle_summary"
|
||
|
android:text="@string/wifitrackerlib_admin_restricted_network"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:gravity="start|center_vertical"
|
||
|
android:textAppearance="@style/TextAppearance.InternetDialog.Secondary"
|
||
|
android:visibility="gone"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_height="48dp"
|
||
|
android:layout_marginTop="10dp"
|
||
|
android:layout_marginBottom="10dp">
|
||
|
<Switch
|
||
|
android:id="@+id/wifi_toggle"
|
||
|
android:contentDescription="@string/turn_on_wifi"
|
||
|
android:switchMinWidth="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_gravity="center"
|
||
|
android:layout_width="@dimen/settingslib_switch_track_width"
|
||
|
android:layout_height="match_parent"
|
||
|
android:track="@drawable/settingslib_track_selector"
|
||
|
android:thumb="@drawable/settingslib_thumb_selector"
|
||
|
android:theme="@style/MainSwitch.Settingslib"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/wifi_connected_layout"
|
||
|
style="@style/InternetDialog.Network"
|
||
|
android:layout_height="@dimen/internet_dialog_wifi_network_height"
|
||
|
android:paddingStart="20dp"
|
||
|
android:paddingEnd="24dp"
|
||
|
android:background="@drawable/settingslib_switch_bar_bg_on"
|
||
|
android:visibility="gone">
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_height="24dp"
|
||
|
android:clickable="false"
|
||
|
android:layout_gravity="center_vertical|start">
|
||
|
<ImageView
|
||
|
android:id="@+id/wifi_connected_icon"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:orientation="vertical"
|
||
|
android:clickable="false"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="@dimen/internet_dialog_wifi_network_height"
|
||
|
android:layout_marginEnd="30dp"
|
||
|
android:layout_weight="1"
|
||
|
android:gravity="start|center_vertical">
|
||
|
<TextView
|
||
|
android:id="@+id/wifi_connected_title"
|
||
|
style="@style/InternetDialog.NetworkTitle.Active"
|
||
|
android:textSize="14sp"/>
|
||
|
<TextView
|
||
|
android:id="@+id/wifi_connected_summary"
|
||
|
style="@style/InternetDialog.NetworkSummary.Active"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_height="match_parent"
|
||
|
android:clickable="false"
|
||
|
android:layout_gravity="end|center_vertical"
|
||
|
android:gravity="center">
|
||
|
<ImageView
|
||
|
android:id="@+id/wifi_settings_icon"
|
||
|
android:src="@drawable/ic_settings_24dp"
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_gravity="end|center_vertical"
|
||
|
android:layout_height="wrap_content"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
<androidx.recyclerview.widget.RecyclerView
|
||
|
android:id="@+id/wifi_list_layout"
|
||
|
android:scrollbars="vertical"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:overScrollMode="never"
|
||
|
android:nestedScrollingEnabled="false"/>
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/see_all_layout"
|
||
|
style="@style/InternetDialog.Network"
|
||
|
android:layout_height="64dp"
|
||
|
android:paddingStart="20dp">
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="24dp"
|
||
|
android:layout_height="24dp"
|
||
|
android:clickable="false"
|
||
|
android:layout_gravity="center_vertical|start">
|
||
|
<ImageView
|
||
|
android:id="@+id/arrow_forward"
|
||
|
android:src="@drawable/ic_arrow_forward"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="center"/>
|
||
|
</FrameLayout>
|
||
|
|
||
|
<FrameLayout
|
||
|
android:orientation="vertical"
|
||
|
android:clickable="false"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="match_parent"
|
||
|
android:layout_marginStart="@dimen/internet_dialog_network_layout_margin">
|
||
|
<TextView
|
||
|
android:text="@string/see_all_networks"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="match_parent"
|
||
|
android:gravity="start|center_vertical"
|
||
|
android:textAppearance="@style/TextAppearance.InternetDialog"
|
||
|
android:textSize="14sp"/>
|
||
|
</FrameLayout>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/wifi_scan_notify_layout"
|
||
|
style="@style/InternetDialog.Network"
|
||
|
android:orientation="vertical"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:paddingBottom="4dp"
|
||
|
android:clickable="false"
|
||
|
android:focusable="false"
|
||
|
android:visibility="gone">
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:minWidth="56dp"
|
||
|
android:gravity="start|top"
|
||
|
android:orientation="horizontal"
|
||
|
android:paddingEnd="12dp"
|
||
|
android:paddingTop="16dp"
|
||
|
android:paddingBottom="4dp">
|
||
|
<ImageView
|
||
|
android:src="@drawable/ic_info_outline"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:tint="?android:attr/textColorTertiary"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical">
|
||
|
<TextView
|
||
|
android:id="@+id/wifi_scan_notify_text"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:paddingTop="16dp"
|
||
|
android:paddingBottom="8dp"
|
||
|
android:textColor="?android:attr/textColorSecondary"
|
||
|
android:clickable="true"/>
|
||
|
</LinearLayout>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/button_layout"
|
||
|
android:orientation="horizontal"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginTop="8dp"
|
||
|
android:layout_marginStart="@dimen/dialog_side_padding"
|
||
|
android:layout_marginEnd="@dimen/dialog_side_padding"
|
||
|
android:layout_marginBottom="@dimen/dialog_bottom_padding"
|
||
|
android:clickable="false"
|
||
|
android:focusable="false">
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_weight="1"
|
||
|
android:layout_gravity="start|center_vertical"
|
||
|
android:orientation="vertical">
|
||
|
<Button
|
||
|
android:id="@+id/apm_button"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:text="@string/turn_off_airplane_mode"
|
||
|
android:ellipsize="end"
|
||
|
android:maxLines="1"
|
||
|
style="@style/Widget.Dialog.Button.BorderButton"
|
||
|
android:clickable="true"
|
||
|
android:focusable="true"/>
|
||
|
</LinearLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginStart="16dp"
|
||
|
android:layout_gravity="end|center_vertical">
|
||
|
<Button
|
||
|
android:id="@+id/done_button"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:text="@string/inline_done_button"
|
||
|
style="@style/Widget.Dialog.Button"
|
||
|
android:maxLines="1"
|
||
|
android:ellipsize="end"
|
||
|
android:clickable="true"
|
||
|
android:focusable="true"/>
|
||
|
</LinearLayout>
|
||
|
</LinearLayout>
|
||
|
|
||
|
</LinearLayout>
|
||
|
</androidx.core.widget.NestedScrollView>
|
||
|
</LinearLayout>
|