Skip to content

Commit

Permalink
[M3][Dialog] Fix dialog icon color tint
Browse files Browse the repository at this point in the history
Only tints dialog icons when it's an SVG with colorControlNormal, which is the common default color used by vector icons.

PiperOrigin-RevId: 418666657
(cherry picked from commit 246b340)
  • Loading branch information
drchen authored and dsn5ft committed Jan 12, 2022
1 parent 6a914c3 commit 29e594c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@
<item name="android:layout_height">@dimen/m3_alert_dialog_icon_size</item>
<item name="android:layout_marginEnd" tools:ignore="NewApi">@dimen/m3_alert_dialog_icon_margin</item>
<item name="android:layout_marginRight">@dimen/m3_alert_dialog_icon_margin</item>
<item name="tint">?attr/colorSecondary</item>
<item name="android:theme">@style/ThemeOverlay.MaterialAlertDialog.Material3.Title.Icon</item>
</style>

<!-- Theme overlay to override icon colors if it's a vector drawable with default colors. -->
<style name="ThemeOverlay.MaterialAlertDialog.Material3.Title.Icon" parent="">
<item name="colorControlNormal">?attr/colorSecondary</item>
</style>

<style name="MaterialAlertDialog.Material3.Title.Icon.CenterStacked">
Expand Down

0 comments on commit 29e594c

Please sign in to comment.