Make chip selection background green to match app theme
Add custom chip_duration_bg selector drawable (green when checked, light gray when unchecked) and wire it through a ChipDuration chipStyle in the theme. This overrides Material3's default purple checked state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="#81C784" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="#F5F5F5" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,12 +1,19 @@
|
||||
<resources>
|
||||
<style name="Theme.CountdownTimer" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_light_primary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_light_secondary</item>
|
||||
<item name="android:statusBarColor">@color/color_gradient_start</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="chipStyle">@style/ChipDuration</item>
|
||||
</style>
|
||||
|
||||
<style name="ChipDuration" parent="Widget.Material3.Chip.Suggestion.Elevated">
|
||||
<item name="chipBackground">@drawable/chip_duration_bg</item>
|
||||
</style>
|
||||
|
||||
<color name="md_theme_light_primary">#2E7D32</color>
|
||||
<color name="md_theme_light_primaryContainer">#81C784</color>
|
||||
<color name="md_theme_light_secondary">#4C6842</color>
|
||||
<color name="md_theme_light_surface">#F1F8E9</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user