Files
vpnhotspotmod/mobile/src/main/res/layout/dialog_wifi_ap.xml
2022-07-12 21:39:20 -04:00

316 lines
16 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Based on:
* https://github.com/material-components/material-components-android/blob/da6096bb8df2ac5b0cabeaa7960501d4083e4ea9/lib/java/com/google/android/material/dialog/res/layout/mtrl_alert_dialog_title.xml
* https://android.googlesource.com/platform/packages/apps/Settings/+/6b4a31c/res/layout/wifi_ap_dialog.xml
-->
<!--
Copyright (C) 2018 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="300sp"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:paddingRight="20dp"
app:title="@string/configuration_view"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fadeScrollbars="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
style="@style/wifi_item">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/ssid_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/wifi_ssid"
app:counterEnabled="true"
app:counterMaxLength="32"
app:errorEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="textMultiLine|textNoSuggestions" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/security_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_security" />
<Spinner
android:id="@+id/security"
style="@style/wifi_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/touch_target_min"
android:prompt="@string/wifi_security" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:hint="@string/wifi_password"
app:counterEnabled="true"
app:counterMaxLength="63"
app:passwordToggleEnabled="true"
app:errorEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:inputType="textPassword"
android:typeface="monospace"
android:maxLength="63"
android:imeOptions="flagForceAscii" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/auto_shutdown"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_hotspot_auto_off"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/timeout_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:hint="@string/wifi_hotspot_timeout"
app:counterEnabled="true"
app:counterMaxLength="19"
app:errorEnabled="true"
app:suffixText="ms">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/timeout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="number"
android:maxLength="19" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/band_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:text="@string/wifi_hotspot_ap_band_title" />
<Spinner
android:id="@+id/band_primary"
style="@style/wifi_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/touch_target_min"
android:prompt="@string/wifi_hotspot_ap_band_title" />
<Spinner
android:id="@+id/band_secondary"
style="@style/wifi_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/touch_target_min"
android:prompt="@string/wifi_hotspot_ap_band_title" />
<TextView
android:id="@+id/band_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:paddingStart="8dp"
android:textAppearance="@style/TextAppearance.Design.Error"
android:visibility="gone"
tools:text="error text placeholder"
tools:visibility="visible"/>
</LinearLayout>
<LinearLayout
android:id="@+id/access_control_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_divider" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_subhead"
android:text="@string/wifi_hotspot_access_control_title" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/max_client_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
app:counterEnabled="true"
app:counterMaxLength="10"
app:errorEnabled="true"
android:hint="@string/wifi_max_clients">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/max_client"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="number"
android:maxLength="10" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/client_user_control"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_client_user_control" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/blocked_list_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:hint="@string/wifi_blocked_list"
app:errorEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/blocked_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="textMultiLine|textNoSuggestions" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/allowed_list_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:hint="@string/wifi_allowed_list"
app:errorEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/allowed_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="textMultiLine|textNoSuggestions" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/advanced_ap_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_divider" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_subhead"
android:text="@string/wifi_hotspot_ap_advanced_title" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/bssid_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
app:counterEnabled="true"
app:counterMaxLength="17"
app:errorEnabled="true"
android:hint="@string/wifi_advanced_mac_address_title">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:inputType="textNoSuggestions"
android:maxLength="17" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/mac_randomization"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_mac_randomization" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/hidden_ssid"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_hidden_network" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/ieee_80211ax"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_ieee_80211ax" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/ieee_80211be"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_ieee_80211be" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/bridged_mode_opportunistic_shutdown"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_bridged_mode_opportunistic_shutdown" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/user_config"
style="@style/wifi_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_user_config" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>