StandardChip placeholder icon color not changing when disabled
StandardChip placeholder icon should have an alpha applied in order to change the color when on disabled state.
Compare:

Our implementation relies on Chip from androidx.wear.compose.material which seems to implement this functionality. From the kdoc:
In order to correctly render when the Chip is not enabled the icon must set its alpha value to [LocalContentAlpha].
However, our implementation uses Coil's rememberAsyncImagePainter to display a placeholder, which receives a Painter type as placeholder, and might not work well with that alpha applied in Chip.
Expected outcome from this task
- PrimaryChip preview for disabled state displays placeholder icon with correct alpha applied
- SecondaryChip preview for disabled state displays placeholder icon with correct alpha applied
- Other previews for PrimaryChip and SecondaryChip are not affected
- PrimaryChip snapshot test for disabled state displays placeholder icon with correct alpha applied
- SecondaryChip snapshot test for disabled state displays placeholder icon with correct alpha applied
- Other snapshot tests for PrimaryChip and SecondaryChip are not affected
@yschimke This might already be resolved please confirm I can see icon with correct alpha , please confirm
@MohitMandalia thanks for checking this, it looks like the issue happens with the placeholder icon. I've updated the issue title and description.
The issue also happens when an image is used instead of icon, which I will raise a separate issue for it:
| disabled | enabled |
|---|---|
![]() |
![]() |
Okk cool.
Hey, I was trying to look into this and I was wondering; is there a reason why you can not just apply a LocalContentAlpha.Current to the image if it is disabled? :smile: From the previews it seems correct, but I got thrown off by this
However, our implementation uses Coil's rememberAsyncImagePainter to display a placeholder,
which receives a Painter type as placeholder, and might not work well with that alpha applied in Chip.
Does that mean that I would need to deprecate and alter the api to not get a painter as a placeholder? and then use something else than rememberAsyncImagePainter?
With the alpha applied to the images, it looks like this for the placeholder disabled preview
@oas004 if you can see it fixed with this, please put up a PR. Thanks!

