Fixing text color of pills in light theme

This commit is contained in:
Maxime Naturel 2022-02-15 15:20:06 +01:00
parent 6736bebc9c
commit 37a990368c
2 changed files with 7 additions and 1 deletions

View File

@ -59,6 +59,10 @@
<item name="android:fontFamily">sans-serif-medium</item>
</style>
<style name="TextAppearance.Vector.Body.OnError">
<item name="android:textColor">?colorOnError</item>
</style>
<style name="TextAppearance.Vector.Caption" parent="TextAppearance.MaterialComponents.Caption">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
@ -81,4 +85,4 @@
<item name="android:letterSpacing">0.02</item>
</style>
</resources>
</resources>

View File

@ -121,6 +121,8 @@ class PillImageSpan(private val glideRequests: GlideRequests,
chipIcon = icon
if (matrixItem is MatrixItem.EveryoneInRoomItem) {
chipBackgroundColor = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.colorError))
// setTextColor API does not exist right now for ChipDrawable, use textAppearance
setTextAppearanceResource(R.style.TextAppearance_Vector_Body_OnError)
}
setBounds(0, 0, intrinsicWidth, intrinsicHeight)
}