commit 7ea1e7c13a07aa498875e937d8bcfeadafe94ebb
parent 971973252886be381197f01ee1f03c7edc7abf35
Author: mcarare <48995920+mcarare@users.noreply.github.com>
Date: Thu, 9 Oct 2025 06:29:20 +0000
Bug 1993327 - Update checkbox and radio button styling. r=android-reviewers,avirvara
Differential Revision: https://phabricator.services.mozilla.com/D268013
Diffstat:
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/mobile/android/focus-android/app/src/main/res/color/compound_button_color_selector.xml b/mobile/android/focus-android/app/src/main/res/color/compound_button_color_selector.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/accentBright" android:state_checked="true" />
+ <item android:color="@color/secondaryText" android:state_checked="false" />
+</selector>
diff --git a/mobile/android/focus-android/app/src/main/res/values/styles.xml b/mobile/android/focus-android/app/src/main/res/values/styles.xml
@@ -18,6 +18,8 @@
<item name="disabled">@color/disabled</item>
<item name="destructive">@color/destructive</item>
<item name="switchStyle">@style/App.Widget.Switch</item>
+ <item name="checkboxStyle">@style/App.Widget.CompoundButton.CheckBox</item>
+ <item name="radioButtonStyle">@style/App.Widget.CompoundButton.RadioButton</item>
<!-- Use the same colors for both themes until light theme it will be implemented -->
<item name="primaryText">@color/primaryText</item>
@@ -309,6 +311,14 @@
<item name="colorControlActivated">@color/accentBright</item>
</style>
+ <style name="App.Widget.CompoundButton.CheckBox" parent="Widget.Material3.CompoundButton.CheckBox">
+ <item name="buttonTint">@color/compound_button_color_selector</item>
+ </style>
+
+ <style name="App.Widget.CompoundButton.RadioButton" parent="Widget.Material3.CompoundButton.RadioButton">
+ <item name="buttonTint">@color/compound_button_color_selector</item>
+ </style>
+
<style name="Preference.Title" parent="Widget.MaterialComponents.TextView">
<item name="android:textColor">@color/preference_title_text</item>
<item name="android:textSize">16sp</item>