Support material switch

This commit is contained in:
Mygod
2022-05-31 21:19:23 -04:00
parent a11e8dea9c
commit 5f76575866
8 changed files with 52 additions and 19 deletions

View File

@@ -97,7 +97,7 @@
android:maxLength="63"
android:imeOptions="flagForceAscii" />
</com.google.android.material.textfield.TextInputLayout>
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/auto_shutdown"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -192,7 +192,7 @@
android:inputType="number"
android:maxLength="10" />
</com.google.android.material.textfield.TextInputLayout>
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/client_user_control"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -261,7 +261,7 @@
android:inputType="textNoSuggestions"
android:maxLength="17" />
</com.google.android.material.textfield.TextInputLayout>
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/mac_randomization"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -269,7 +269,7 @@
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_mac_randomization" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/hidden_ssid"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -277,7 +277,7 @@
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_hidden_network" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/ieee_80211ax"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -285,7 +285,7 @@
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_ieee_80211ax" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/bridged_mode_opportunistic_shutdown"
style="@style/wifi_item_label"
android:layout_width="match_parent"
@@ -293,7 +293,7 @@
android:layout_marginTop="8dip"
android:minHeight="@dimen/touch_target_min"
android:text="@string/wifi_bridged_mode_opportunistic_shutdown" />
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/user_config"
style="@style/wifi_item_label"
android:layout_width="match_parent"

View File

@@ -50,7 +50,7 @@
tools:text="192.168.43.1/24\n01:23:45:ab:cd:ef"/>
</LinearLayout>
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"

View File

@@ -54,7 +54,7 @@
tools:text="192.168.43.1/24\n01:23:45:ab:cd:ef"/>
</LinearLayout>
<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 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.
-->
<!-- https://android.googlesource.com/platform/frameworks/support/+/3c79906/preference/preference/res/layout/preference_widget_switch_compat.xml -->
<!-- Layout used by SwitchPreference for the switch widget style. This is inflated
inside android.R.layout.preference. -->
<com.google.android.material.materialswitch.MaterialSwitch
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false"
android:background="@null"/>