From 4245650a07d6b73451bc16ce8dc4be1e045be70d Mon Sep 17 00:00:00 2001 From: Dhina17 <dhinalogu@gmail.com> Date: Thu, 23 May 2024 14:35:57 +0530 Subject: [PATCH] SettingsLib: Improve segmented buttons UI - It's used in the ZenMode dialog Change-Id: Ia7fdc048eab5b56c1219493da6f06f79bdc2002b --- .../res/color/settingslib_segmented_button_text_selector.xml | 4 ++-- .../res/drawable/settingslib_segmented_buttons_background.xml | 2 +- .../SettingsLib/res/values/settingslib_segmented_button.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SettingsLib/res/color/settingslib_segmented_button_text_selector.xml b/packages/SettingsLib/res/color/settingslib_segmented_button_text_selector.xml index 11b6424ecb17..f56ede1c5203 100644 --- a/packages/SettingsLib/res/color/settingslib_segmented_button_text_selector.xml +++ b/packages/SettingsLib/res/color/settingslib_segmented_button_text_selector.xml @@ -16,6 +16,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_selected="true" android:color="?android:attr/textColorPrimary"/> - <item android:alpha="0.58" android:color="?android:attr/colorForeground"/> + <item android:state_selected="true" android:color="?android:attr/colorControlActivated"/> + <item android:alpha="0.58" android:color="?android:attr/colorControlNormal"/> </selector> diff --git a/packages/SettingsLib/res/drawable/settingslib_segmented_buttons_background.xml b/packages/SettingsLib/res/drawable/settingslib_segmented_buttons_background.xml index 71c779554d7c..1dce8341bf41 100644 --- a/packages/SettingsLib/res/drawable/settingslib_segmented_buttons_background.xml +++ b/packages/SettingsLib/res/drawable/settingslib_segmented_buttons_background.xml @@ -16,5 +16,5 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android" > <corners android:radius="@dimen/settingslib_borderless_button_radius" /> - <solid android:color="?android:attr/colorPrimaryDark" /> + <solid android:color="?android:attr/colorButtonNormal" /> </shape> diff --git a/packages/SettingsLib/res/values/settingslib_segmented_button.xml b/packages/SettingsLib/res/values/settingslib_segmented_button.xml index 7ffe07e26a8b..b5f3cd11a6b3 100644 --- a/packages/SettingsLib/res/values/settingslib_segmented_button.xml +++ b/packages/SettingsLib/res/values/settingslib_segmented_button.xml @@ -15,7 +15,7 @@ --> <resources> <dimen name="settingslib_segmented_button_spacing">0dp</dimen> - <dimen name="settingslib_borderless_button_radius">2dp</dimen> + <dimen name="settingslib_borderless_button_radius">28dp</dimen> <style name="SettingsLibTextAppearanceSegmentedButton"> <item name="android:textSize">16sp</item> <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item> -- GitLab