How to add drop shadow to any PNG in Android Compose?

104 views Asked by At

I want do display images with an exact shadow using Compose (and Coil).

This is the desired shadow:

image with drop shadow

However, the shadow modifier only adds a shadow around the image bounds.

AsyncImage(
        modifier = Modifier.shadow(elevation = 4.dp),
        model = "http://my.image.url",
)

How can I achieve the shadow above using Compose?

0

There are 0 answers