Merge "Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings."

This commit is contained in:
Stanley Wang
2021-01-15 02:14:52 +00:00
committed by Android (Google) Code Review
51 changed files with 783 additions and 271 deletions

View File

@@ -25,7 +25,11 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/styled_switch_bar"/>
<com.android.settingslib.widget.MainSwitchBar
android:id="@+id/main_switch_bar"
android:visibility="invisible"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
<LinearLayout
android:id="@+id/history_off"
@@ -197,4 +201,4 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 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"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.android.settings.widget.SettingsMainSwitchBar
android:id="@+id/main_switch_bar"
android:visibility="invisible"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
</LinearLayout>

View File

@@ -22,11 +22,11 @@
android:layout_height="match_parent"
android:layout_width="match_parent">
<com.android.settings.widget.SwitchBar
<com.android.settings.widget.SettingsMainSwitchBar
android:id="@+id/switch_bar"
android:layout_height="?android:attr/actionBarSize"
android:visibility="gone"
android:layout_width="match_parent"
android:theme="?attr/switchBarTheme"/>
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@+id/main_content"