Dialer: Style Settings
Change-Id: I674c12ede4ab465b22cb3959dbeeb4b52647b8be
diff --git a/java/com/android/dialer/app/res/color/switch_thumb_color.xml b/java/com/android/dialer/app/res/color/switch_thumb_color.xml
new file mode 100644
index 0000000..6391563
--- /dev/null
+++ b/java/com/android/dialer/app/res/color/switch_thumb_color.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2021 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Disabled status of thumb -->
+ <item android:state_enabled="false"
+ android:color="@color/thumb_disabled_color" />
+ <!-- Toggle off status of thumb -->
+ <item android:state_checked="false"
+ android:color="@color/thumb_off_color" />
+ <!-- Enabled or toggle on status of thumb -->
+ <item android:color="@color/state_on_color" />
+</selector>
diff --git a/java/com/android/dialer/app/res/color/switch_track_color.xml b/java/com/android/dialer/app/res/color/switch_track_color.xml
new file mode 100644
index 0000000..9a645d9
--- /dev/null
+++ b/java/com/android/dialer/app/res/color/switch_track_color.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2021 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Disabled status of thumb -->
+ <item android:state_enabled="false"
+ android:color="@color/track_off_color"
+ android:alpha="?android:attr/disabledAlpha" />
+ <!-- Toggle off status of thumb -->
+ <item android:state_checked="false"
+ android:color="@color/track_off_color" />
+ <!-- Enabled or toggle on status of thumb -->
+ <item android:color="@color/track_on_color" />
+</selector>
diff --git a/java/com/android/dialer/app/res/drawable/popup_background.xml b/java/com/android/dialer/app/res/drawable/popup_background.xml
new file mode 100644
index 0000000..fe5e465
--- /dev/null
+++ b/java/com/android/dialer/app/res/drawable/popup_background.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <corners android:radius="28dp" />
+ <solid android:color="@android:color/system_neutral2_700" />
+</shape>
diff --git a/java/com/android/dialer/app/res/drawable/switch_thumb.xml b/java/com/android/dialer/app/res/drawable/switch_thumb.xml
new file mode 100644
index 0000000..4ff649c
--- /dev/null
+++ b/java/com/android/dialer/app/res/drawable/switch_thumb.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2021 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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:top="4dp"
+ android:left="4dp"
+ android:right="4dp"
+ android:bottom="4dp">
+ <shape android:shape="oval" >
+ <size android:height="20dp" android:width="20dp" />
+ <solid android:color="@color/switch_thumb_color" />
+ </shape>
+ </item>
+</layer-list>
diff --git a/java/com/android/dialer/app/res/drawable/switch_track.xml b/java/com/android/dialer/app/res/drawable/switch_track.xml
new file mode 100644
index 0000000..f54a350
--- /dev/null
+++ b/java/com/android/dialer/app/res/drawable/switch_track.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2021 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.
+-->
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle"
+ android:width="52dp"
+ android:height="28dp">
+
+ <solid android:color="@color/switch_track_color" />
+ <corners android:radius="35dp" />
+</shape>
diff --git a/java/com/android/dialer/app/res/layout/widget_switch_compat.xml b/java/com/android/dialer/app/res/layout/widget_switch_compat.xml
new file mode 100644
index 0000000..8cf2393
--- /dev/null
+++ b/java/com/android/dialer/app/res/layout/widget_switch_compat.xml
@@ -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.
+ -->
+
+<!-- Layout used by SwitchPreference for the switch widget style. This is inflated
+ inside android.R.layout.preference. -->
+<androidx.appcompat.widget.SwitchCompat
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/Dialer.Switch"
+ android:id="@+id/switchWidget"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:clickable="false"
+ android:background="@null"/>
diff --git a/java/com/android/dialer/app/res/values/colors.xml b/java/com/android/dialer/app/res/values/colors.xml
index 8a37df0..45aba55 100644
--- a/java/com/android/dialer/app/res/values/colors.xml
+++ b/java/com/android/dialer/app/res/values/colors.xml
@@ -25,4 +25,19 @@
<color name="nav_item">@android:color/system_neutral1_600</color>
<color name="dialer_pill_color">@android:color/system_accent2_200</color>
<color name="dialer_fab_icon_color">#ffffffff</color>
+
+ <!-- Material next state on color-->
+ <color name="state_on_color">@android:color/system_accent3_100</color>
+
+ <!-- Material next thumb disable color-->
+ <color name="thumb_disabled_color">@android:color/black</color>
+
+ <!-- Material next thumb off color-->
+ <color name="thumb_off_color">@color/dialer_background_color</color>
+
+ <!-- Material next track on color-->
+ <color name="track_on_color">@color/dialer_theme_color</color>
+
+ <!-- Material next track off color-->
+ <color name="track_off_color">@android:color/system_neutral2_500</color>
</resources>
diff --git a/java/com/android/dialer/app/res/values/dimens.xml b/java/com/android/dialer/app/res/values/dimens.xml
index fb68e68..22730fd 100644
--- a/java/com/android/dialer/app/res/values/dimens.xml
+++ b/java/com/android/dialer/app/res/values/dimens.xml
@@ -37,4 +37,6 @@
<dimen name="call_log_list_item_primary_action_dimen">48dp</dimen>
<dimen name="voicemail_playback_top_padding">12dp</dimen>
+
+ <dimen name="touch_target_min_size">48dp</dimen>
</resources>
diff --git a/java/com/android/dialer/app/res/xml/display_options_settings.xml b/java/com/android/dialer/app/res/xml/display_options_settings.xml
index f154122..0f424ea 100644
--- a/java/com/android/dialer/app/res/xml/display_options_settings.xml
+++ b/java/com/android/dialer/app/res/xml/display_options_settings.xml
@@ -16,7 +16,8 @@
~ limitations under the License
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<ListPreference
android:dialogTitle="@string/display_options_sort_list_by"
@@ -25,7 +26,8 @@
android:entries="@array/contact_sort_order_entries"
android:entryValues="@array/contact_sort_order_values"
android:title="@string/display_options_sort_list_by"
- android:defaultValue="@string/display_options_sort_by_given_name_value"/>
+ android:defaultValue="@string/display_options_sort_by_given_name_value"
+ app:iconSpaceReserved="false"/>
<ListPreference
android:dialogTitle="@string/display_options_view_names_as"
@@ -34,6 +36,7 @@
android:entries="@array/contact_display_order_entries"
android:entryValues="@array/contact_display_order_values"
android:title="@string/display_options_view_names_as"
- android:defaultValue="@string/display_options_view_given_name_first_value"/>
+ android:defaultValue="@string/display_options_view_given_name_first_value"
+ app:iconSpaceReserved="false"/>
</PreferenceScreen>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index e242598..86f9284 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -17,73 +17,80 @@
~ limitations under the License
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
- <com.android.dialer.app.settings.DefaultRingtonePreference
- android:dialogTitle="@string/ringtone_title"
- android:key="@string/ringtone_preference_key"
- android:persistent="false"
- android:ringtoneType="ringtone"
- android:title="@string/ringtone_title"/>
-
- <SwitchPreferenceCompat
- android:defaultValue="false"
- android:key="@string/vibrate_on_preference_key"
- android:persistent="false"
- android:title="@string/vibrate_on_ring_title"/>
-
- <SwitchPreferenceCompat
- android:defaultValue="true"
- android:key="@string/play_dtmf_preference_key"
- android:persistent="false"
- android:title="@string/dtmf_tone_enable_title"/>
-
- <ListPreference
- android:entries="@array/dtmf_tone_length_entries"
- android:entryValues="@array/dtmf_tone_length_entry_values"
- android:key="@string/dtmf_tone_length_preference_key"
- android:title="@string/dtmf_tone_length_title"/>
-
- <PreferenceCategory
- android:key="@string/incall_category_key"
- android:title="@string/incall_category_title">
+ <com.android.dialer.app.settings.DefaultRingtonePreference
+ android:dialogTitle="@string/ringtone_title"
+ android:key="@string/ringtone_preference_key"
+ android:persistent="false"
+ android:ringtoneType="ringtone"
+ android:title="@string/ringtone_title"
+ android:summary=" "
+ app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="false"
- android:key="incall_enable_dnd"
- android:title="@string/incall_enable_dnd_title"/>
+ android:key="@string/vibrate_on_preference_key"
+ android:persistent="false"
+ android:title="@string/vibrate_on_ring_title" />
<SwitchPreferenceCompat
- android:key="@string/incall_vibrate_outgoing_key"
- android:title="@string/incall_vibrate_outgoing_title" />
-
- <SwitchPreferenceCompat
- android:key="@string/incall_vibrate_call_waiting_key"
- android:title="@string/incall_vibrate_call_waiting_title" />
-
- <SwitchPreferenceCompat
- android:key="@string/incall_vibrate_hangup_key"
- android:title="@string/incall_vibrate_hangup_title" />
-
- <SwitchPreferenceCompat
- android:key="@string/incall_vibrate_45_key"
- android:title="@string/incall_vibrate_45_title"
- android:summary="@string/incall_vibrate_45_summary" />
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="@string/call_recording_category_key"
- android:title="@string/call_recording_category_title">
+ android:defaultValue="true"
+ android:key="@string/play_dtmf_preference_key"
+ android:persistent="false"
+ android:title="@string/dtmf_tone_enable_title" />
<ListPreference
- android:key="@string/call_recording_format_key"
- android:title="@string/call_recording_format"
- android:summary="%s"
- android:entries="@array/call_recording_encoder_entries"
- android:entryValues="@array/call_recording_encoder_values"
- android:defaultValue="0" />
+ android:entries="@array/dtmf_tone_length_entries"
+ android:entryValues="@array/dtmf_tone_length_entry_values"
+ android:key="@string/dtmf_tone_length_preference_key"
+ android:title="@string/dtmf_tone_length_title"
+ app:iconSpaceReserved="false" />
- </PreferenceCategory>
+ <PreferenceCategory
+ android:key="@string/incall_category_key"
+ android:title="@string/incall_category_title"
+ app:iconSpaceReserved="false">
+
+ <SwitchPreferenceCompat
+ android:defaultValue="false"
+ android:key="incall_enable_dnd"
+ android:title="@string/incall_enable_dnd_title" />
+
+ <SwitchPreferenceCompat
+ android:key="@string/incall_vibrate_outgoing_key"
+ android:title="@string/incall_vibrate_outgoing_title" />
+
+ <SwitchPreferenceCompat
+ android:key="@string/incall_vibrate_call_waiting_key"
+ android:title="@string/incall_vibrate_call_waiting_title" />
+
+ <SwitchPreferenceCompat
+ android:key="@string/incall_vibrate_hangup_key"
+ android:title="@string/incall_vibrate_hangup_title" />
+
+ <SwitchPreferenceCompat
+ android:key="@string/incall_vibrate_45_key"
+ android:summary="@string/incall_vibrate_45_summary"
+ android:title="@string/incall_vibrate_45_title" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="@string/call_recording_category_key"
+ android:title="@string/call_recording_category_title"
+ app:iconSpaceReserved="false">
+
+ <ListPreference
+ android:defaultValue="0"
+ android:entries="@array/call_recording_encoder_entries"
+ android:entryValues="@array/call_recording_encoder_values"
+ android:key="@string/call_recording_format_key"
+ android:summary="%s"
+ android:title="@string/call_recording_format"
+ app:iconSpaceReserved="false" />
+
+ </PreferenceCategory>
</PreferenceScreen>
diff --git a/java/com/android/dialer/app/settings/DialerSettingsActivity.java b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
index b8d087e..b4e1782 100644
--- a/java/com/android/dialer/app/settings/DialerSettingsActivity.java
+++ b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
@@ -125,6 +125,7 @@
Preference displayOptions = new Preference(getContext());
displayOptions.setTitle(R.string.display_options_title);
displayOptions.setFragment(DisplayOptionsSettingsFragment.class.getName());
+ displayOptions.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(displayOptions);
}
@@ -132,6 +133,7 @@
soundSettings.setTitle(R.string.sounds_and_vibration_title);
soundSettings.setFragment(SoundSettingsFragment.class.getName());
soundSettings.setViewId(R.id.settings_header_sounds_and_vibration);
+ soundSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(soundSettings);
Preference quickResponseSettings = new Preference(getContext());
@@ -139,11 +141,13 @@
new Intent(TelecomManager.ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS);
quickResponseSettings.setTitle(R.string.respond_via_sms_setting_title);
quickResponseSettings.setIntent(quickResponseSettingsIntent);
+ quickResponseSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(quickResponseSettings);
final Preference lookupSettings = new Preference(getContext());
lookupSettings.setTitle(R.string.lookup_settings_label);
lookupSettings.setFragment(LookupSettingsFragment.class.getName());
+ lookupSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(lookupSettings);
TelephonyManager telephonyManager = getContext().getSystemService(TelephonyManager.class);
@@ -160,6 +164,7 @@
callSettings.setTitle(R.string.call_settings_label);
callSettings.setIntent(callSettingsIntent);
+ callSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(callSettings);
} else {
Preference phoneAccountSettings = new Preference(getContext());
@@ -168,6 +173,7 @@
phoneAccountSettings.setTitle(R.string.phone_account_settings_label);
phoneAccountSettings.setIntent(phoneAccountSettingsIntent);
+ phoneAccountSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(phoneAccountSettings);
}
if (BlockedNumberContract.canCurrentUserBlockNumbers(getContext())) {
@@ -175,6 +181,7 @@
blockedCalls.setTitle(R.string.manage_blocked_numbers_label);
blockedCalls.setIntent(getContext().getSystemService(TelecomManager.class)
.createManageBlockedNumbersIntent());
+ blockedCalls.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(blockedCalls);
}
@@ -188,6 +195,7 @@
new Intent(TelecomManager.ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS);
accessibilitySettings.setTitle(R.string.accessibility_settings_title);
accessibilitySettings.setIntent(accessibilitySettingsIntent);
+ accessibilitySettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(accessibilitySettings);
}
}
@@ -247,6 +255,7 @@
bundle.putParcelable(VoicemailClient.PARAM_PHONE_ACCOUNT_HANDLE, soleAccount);
}
voicemailSettings.getExtras().putAll(bundle);
+ voicemailSettings.setIconSpaceReserved(false);
getPreferenceScreen().addPreference(voicemailSettings);
}
diff --git a/java/com/android/dialer/app/settings/PhoneAccountSelectionFragment.java b/java/com/android/dialer/app/settings/PhoneAccountSelectionFragment.java
index fb15a6d..a1923d1 100644
--- a/java/com/android/dialer/app/settings/PhoneAccountSelectionFragment.java
+++ b/java/com/android/dialer/app/settings/PhoneAccountSelectionFragment.java
@@ -93,6 +93,8 @@
Icon icon = phoneAccount.getIcon();
if (icon != null) {
setIcon(icon.loadDrawable(context));
+ } else {
+ setIconSpaceReserved(false);
}
}
diff --git a/java/com/android/dialer/lookup/res/xml/lookup_settings.xml b/java/com/android/dialer/lookup/res/xml/lookup_settings.xml
index 4168df1..2eb6bc4 100644
--- a/java/com/android/dialer/lookup/res/xml/lookup_settings.xml
+++ b/java/com/android/dialer/lookup/res/xml/lookup_settings.xml
@@ -17,39 +17,44 @@
~ limitations under the License
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<SwitchPreferenceCompat
- android:key="enable_forward_lookup"
- android:title="@string/enable_forward_lookup_title"
- android:summary="@string/enable_forward_lookup_summary"
android:defaultValue="false"
- android:persistent="false" />
+ android:key="enable_forward_lookup"
+ android:persistent="false"
+ android:summary="@string/enable_forward_lookup_summary"
+ android:title="@string/enable_forward_lookup_title" />
<ListPreference
- android:key="forward_lookup_provider"
- android:title="@string/forward_lookup_provider_title"
+ android:dependency="enable_forward_lookup"
android:entries="@array/forward_lookup_provider_names"
android:entryValues="@array/forward_lookup_providers"
- android:dependency="enable_forward_lookup"
+ android:key="forward_lookup_provider"
+ android:persistent="false"
android:summary="%s"
- android:persistent="false" />
+ android:title="@string/forward_lookup_provider_title"
+ app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
- android:key="enable_reverse_lookup"
- android:title="@string/enable_reverse_lookup_title"
- android:summary="@string/enable_reverse_lookup_summary"
android:defaultValue="false"
- android:persistent="false" />
+ android:key="enable_reverse_lookup"
+ android:persistent="false"
+ android:summary="@string/enable_reverse_lookup_summary"
+ android:title="@string/enable_reverse_lookup_title" />
<ListPreference
- android:key="reverse_lookup_provider"
- android:title="@string/reverse_lookup_provider_title"
+ android:dependency="enable_reverse_lookup"
android:entries="@array/reverse_lookup_provider_names"
android:entryValues="@array/reverse_lookup_providers"
- android:dependency="enable_reverse_lookup"
+ android:key="reverse_lookup_provider"
+ android:persistent="false"
android:summary="%s"
- android:persistent="false" />
+ android:title="@string/reverse_lookup_provider_title"
+ app:iconSpaceReserved="false" />
- <Preference android:summary="@string/lookup_disclaimer" />
+ <Preference
+ android:summary="@string/lookup_disclaimer"
+ app:iconSpaceReserved="false" />
</PreferenceScreen>
diff --git a/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
index 466360a..1029587 100644
--- a/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
+++ b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
@@ -37,6 +37,9 @@
<item name="colorPrimary">@color/dialer_primary_color</item>
<item name="colorPrimaryDark">@color/dialer_primary_color</item>
<item name="android:statusBarColor">@color/dialer_primary_color</item>
+ <item name="preferenceTheme">@style/Dialer.Settings.PreferenceTheme</item>
+ <item name="android:switchStyle">@style/Dialer.Switch</item>
+ <item name="android:dropDownSpinnerStyle">@style/Dialer.Settings.DropDownSpinnerStyle</item>
</style>
<!-- TODO(a bug): This is only actively used in empty_content_view.xml. Move it there. -->
@@ -52,4 +55,22 @@
<item name="android:singleLine">true</item>
<item name="android:textAllCaps">true</item>
</style>
+
+ <style name="Dialer.SwitchPreferenceCompat" parent="@style/Preference.SwitchPreferenceCompat.Material">
+ <item name="iconSpaceReserved">false</item>
+ <item name="android:widgetLayout">@layout/widget_switch_compat</item>
+ </style>
+
+ <style name="Dialer.Switch" parent="@android:style/Widget.Material.CompoundButton.Switch">
+ <item name="android:switchMinWidth">52dp</item>
+ <item name="android:minHeight">@dimen/touch_target_min_size</item>
+ <item name="android:track">@drawable/switch_track</item>
+ <item name="track">@drawable/switch_track</item>
+ <item name="android:thumb">@drawable/switch_thumb</item>
+ <item name="thumbTint">@color/dialer_background_color</item>
+ </style>
+
+ <style name="Dialer.Settings.DropDownSpinnerStyle" parent="@android:style/Widget.Material.Spinner">
+ <item name="android:popupBackground">@drawable/popup_background</item>
+ </style>
</resources>
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
index 1780fcb..b9ea10c 100644
--- a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
@@ -93,4 +93,10 @@
<item name="background">?android:attr/colorPrimary</item>
</style>
<style name="DialerActionBarBaseTheme" parent="@style/ThemeOverlay.AppCompat.ActionBar" />
+
+ <style name="Dialer.Settings.PreferenceTheme" parent="@style/PreferenceThemeOverlay">
+ <item name="switchPreferenceCompatStyle">@style/Dialer.SwitchPreferenceCompat</item>
+ </style>
+
+
</resources>
diff --git a/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml b/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml
index fe6b85b..194ddce 100644
--- a/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml
+++ b/java/com/android/dialer/voicemail/settings/res/xml/voicemail_settings.xml
@@ -21,24 +21,29 @@
<Preference
android:key="@string/voicemail_notifications_key"
- android:title="@string/voicemail_notifications_preference_title"/>
+ android:title="@string/voicemail_notifications_preference_title"
+ app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:key="@string/voicemail_visual_voicemail_key"
- android:title="@string/voicemail_visual_voicemail_switch_title"/>"
+ android:title="@string/voicemail_visual_voicemail_switch_title"
+ app:iconSpaceReserved="false" />"
<SwitchPreferenceCompat
android:dependency="@string/voicemail_visual_voicemail_key"
android:key="@string/voicemail_visual_voicemail_archive_key"
- android:title="@string/voicemail_visual_voicemail_auto_archive_switch_title"/>"
+ android:title="@string/voicemail_visual_voicemail_auto_archive_switch_title"
+ app:iconSpaceReserved="false" />"
<Preference
android:key="@string/voicemail_change_pin_key"
- android:title="@string/voicemail_change_pin_preference_title"/>
+ android:title="@string/voicemail_change_pin_preference_title"
+ app:iconSpaceReserved="false" />
<PreferenceScreen
android:key="@string/voicemail_advanced_settings_key"
- android:title="@string/voicemail_advanced_settings_title">
+ android:title="@string/voicemail_advanced_settings_title"
+ app:iconSpaceReserved="false" >
</PreferenceScreen>
</PreferenceScreen>