Use SettingsLib's MainSwitchPreference to replace the Switches which use
LayoutPreference. Bug: 175181773 Test: Run robotest and apply the widget in Settings and see the ui Change-Id: I4588d1fc3004970b174e7c5c5d1aa7745f774985
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
android:key="pref_app_header"
|
||||
android:layout="@layout/settings_entity_header" />
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="block"
|
||||
android:layout="@layout/styled_switch_bar" />
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="block" />
|
||||
|
||||
<com.android.settings.notification.app.NotificationFooterPreference
|
||||
android:key="block_desc" />
|
||||
|
@@ -20,16 +20,18 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/emergency_gesture_screen_title">
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="gesture_emergency_button_switch_bar"
|
||||
app:controller="com.android.settings.gestures.EmergencyGesturePreferenceController" />
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
android:key="emergency_gesture_screen_video"
|
||||
app:animation="@raw/gesture_double_tap"
|
||||
app:preview="@drawable/gesture_double_tap"/>
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="gesture_emergency_button_switch_bar"
|
||||
android:layout="@layout/emergency_gesture_switch_bar"
|
||||
app:controller="com.android.settings.gestures.EmergencyGesturePreferenceController"
|
||||
app:allowDividerBelow="true"/>
|
||||
<com.android.settingslib.widget.TopIntroPreference
|
||||
android:title="@string/emergency_gesture_screen_summary"
|
||||
app:allowDividerBelow="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="emergency_gesture_sound"
|
||||
|
@@ -20,16 +20,15 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/gesture_prevent_ringing_screen_title">
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="gesture_prevent_ringing_switch" />
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
android:key="gesture_prevent_ringing_video"
|
||||
app:animation="@raw/gesture_prevent_ringing"
|
||||
app:preview="@drawable/gesture_prevent_ringing"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="gesture_prevent_ringing_switch"
|
||||
android:layout="@layout/styled_switch_bar" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="gesture_prevent_ringing_category"
|
||||
android:title="@string/gesture_prevent_ringing_title" />
|
||||
|
@@ -27,13 +27,12 @@
|
||||
android:selectable="false"
|
||||
settings:allowDividerBelow="true" />
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="zen_automatic_rule_switch" />
|
||||
|
||||
<com.android.settingslib.widget.ActionButtonsPreference
|
||||
android:key="zen_action_buttons" />
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="zen_automatic_rule_switch"
|
||||
android:layout="@layout/styled_switch_bar" />
|
||||
|
||||
<!-- During events for -->
|
||||
<DropDownPreference
|
||||
android:key="calendar"
|
||||
|
@@ -27,13 +27,12 @@
|
||||
android:selectable="false"
|
||||
settings:allowDividerBelow="true"/>
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="zen_automatic_rule_switch" />
|
||||
|
||||
<com.android.settingslib.widget.ActionButtonsPreference
|
||||
android:key="zen_action_buttons"/>
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="zen_automatic_rule_switch"
|
||||
android:layout="@layout/styled_switch_bar" />
|
||||
|
||||
<!-- Days -->
|
||||
<Preference
|
||||
android:key="days"
|
||||
|
Reference in New Issue
Block a user