mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
[Catalog] Fix chip icon colors
It doesn't make sense to use pure black/white for the star icon's unchecked/checked states. Changes to use ?attr/colorControlNormal to support light/dark mode switching and chip icon tinting. PiperOrigin-RevId: 416369553
This commit is contained in:
parent
e7bc947cd5
commit
5fac4fd735
@ -20,6 +20,6 @@
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="?attr/colorControlNormal"
|
||||
android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/>
|
||||
</vector>
|
||||
@ -17,5 +17,5 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true"
|
||||
android:drawable="@drawable/ic_star_vd_theme_24"/>
|
||||
<item android:drawable="@drawable/ic_star_border_black_24"/>
|
||||
<item android:drawable="@drawable/ic_star_border_vd_theme_24"/>
|
||||
</selector>
|
||||
|
||||
@ -17,6 +17,6 @@
|
||||
android:viewportWidth="24.0"
|
||||
android:width="24dp">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:fillColor="?attr/colorControlNormal"
|
||||
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
|
||||
</vector>
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
android:layout_toRightOf="@id/cat_chip_input"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/cat_chip_text"
|
||||
app:checkedIconVisible="false"
|
||||
app:chipIcon="@drawable/ic_star_checkable_24"
|
||||
app:ensureMinTouchTargetSize="true"/>
|
||||
|
||||
@ -83,6 +84,7 @@
|
||||
android:layout_toRightOf="@id/cat_chip_input_icon"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/cat_chip_text"
|
||||
app:checkedIconVisible="false"
|
||||
app:chipIcon="@drawable/ic_star_checkable_24"
|
||||
app:ensureMinTouchTargetSize="true"/>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user