diff options
5 files changed, 24 insertions, 53 deletions
diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch.xml b/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch.xml deleted file mode 100644 index 1ffdad47bd3c..000000000000 --- a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ~ Copyright (C) 2023 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. - --> - -<Switch - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@android:id/switch_widget" - android:layout_width="wrap_content" - android:layout_height="48dp" - android:clickable="false" - android:focusable="false" - android:theme="@style/Switch.SettingsLib" /> diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml b/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml index 1054e0017cf1..e3f8fbb88a65 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml @@ -47,7 +47,14 @@ android:textAppearance="?android:attr/textAppearanceListItem" style="@style/MainSwitchText.Settingslib" /> - <include layout="@layout/settingslib_main_switch" /> + <Switch + android:id="@android:id/switch_widget" + android:layout_width="wrap_content" + android:layout_height="48dp" + android:layout_gravity="center_vertical" + android:focusable="false" + android:clickable="false" + android:theme="@style/Switch.SettingsLib"/> </LinearLayout> </LinearLayout> diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout-v33/settingslib_main_switch_bar.xml b/packages/SettingsLib/MainSwitchPreference/res/layout-v33/settingslib_main_switch_bar.xml index 4a0e7b377412..255b2c92e709 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/layout-v33/settingslib_main_switch_bar.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/layout-v33/settingslib_main_switch_bar.xml @@ -49,7 +49,14 @@ android:lineBreakWordStyle="phrase" style="@style/MainSwitchText.Settingslib" /> - <include layout="@layout/settingslib_main_switch" /> + <Switch + android:id="@android:id/switch_widget" + android:layout_width="wrap_content" + android:layout_height="48dp" + android:layout_gravity="center_vertical" + android:focusable="false" + android:clickable="false" + android:theme="@style/Switch.SettingsLib"/> </LinearLayout> </LinearLayout> diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch.xml b/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch.xml deleted file mode 100644 index 12c1d76e9ae4..000000000000 --- a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ~ Copyright (C) 2023 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. - --> - -<Switch - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@android:id/switch_widget" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:clickable="false" - android:focusable="false" - android:theme="@style/SwitchBar.Switch.Settingslib" /> diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml b/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml index fe64fea2d7cc..bf34db93298b 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml @@ -38,6 +38,13 @@ android:layout_marginStart="@dimen/settingslib_switchbar_subsettings_margin_start" android:textAlignment="viewStart"/> - <include layout="@layout/settingslib_main_switch" /> + <Switch + android:id="@android:id/switch_widget" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:focusable="false" + android:clickable="false" + android:theme="@style/SwitchBar.Switch.Settingslib"/> </LinearLayout> |